Order For Similar Custom Papers & Assignment Help Services

Fill the order form details - writing instructions guides, and get your paper done.

Posted: June 15th, 2022

e careful to implement the steps of each

© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 5 InheritanceLab 5 InheritancePurposePurpose is to practice using regular inheritance.The Checking superclassFirst design, code and test a class called Checking. This will be your superclass.Use exactly and only these instance variables:private String accountIDprivate int balanceprivate int numDepositsprivate int numWithdrawalsprivate double annualRateprivate int serviceCharge-an identifying account number e.g. “123”-balance of the account in pennies, to avoid floatingpoint round-off errors e.g. 100 means $1.00-number of deposits made this month-number of withdrawals made this month-annual interest rate e.g. 0.15 means 15% perannum-maintain the total monthly service charges incurredhere, in penniesChecking will have the following methods. Be careful to implement the steps of eachmethod in exactly the order given below:constructor-has parameters for the account ID, starting balance (in dollars) and annual interest rate-must initialize all instance variables-use the following to convert the dollar starting balance parameter bal to cents, avoidinground-off error:balance = (int) Math.round(bal * 100.0);appropriate get and set methods-you have to decide during design what get and set methods are requireddeposit()-has a parameter for the deposit amount in dollars-make the necessary conversion then add the amount to the balance-increment the number of deposits-add a deposit fee of 10 cents (in pennies) to the monthly service charge1© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 5 Inheritance-note that the deposit fee is NOT deducted from balance at the time of the deposittransaction-(use static final constants for all the fee amounts)withdraw()-has a parameter for the withdrawal amount in dollars-make the necessary conversion then subtract the amount from the balance-increment the number of withdrawals-add a withdrawal fee (in pennies) to the monthly service charge:-the first 2 withdrawals cost 25 cents each-withdrawals after the first 2 cost 75 cents eachdepositInterest()-update the balance by calculating the monthly interest earned on the account, then addthis interest to the balance. In pseudocode:monthly interest rate = annual interest rate / 12.0monthly interest = balance * monthly interest ratebalance = balance + monthly interest-(use Math.round() where necessary to prevent rounding errors)printMonthEnd()-run at the end of the month to first add interest, then deduct monthly service charges,than summarize the account. In pseudocode (implement these actions in exactly thisorder):call the depositInterest() methodadd a monthly fee of $1.00 to the monthly service chargedecrease the balance by the total monthly service chargeoutput the account ID, resulting balance, number of deposits and withdrawals and themonthly service charge (use printf() to output monetary amounts in dollars, with 2decimal places)set the number of deposits and withdrawals and monthly service charge to zero-an example of the printMonthEnd() output format:Account ID 123Balance is: $751.881 deposits, 3 withdrawalsMonthly service charge was: $2.352© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 5 InheritancetoString()-return a String that represents the Checking object, must be in standardized formattinge.g.Checking[accountID=123, balance=74800, numDeposits=1, numWithdrawals=3,annualRate=0.1, serviceCharge=135]The MoneyMarket subclassNext design, code and test a MoneyMarket subclass that inherits from Checking.MoneyMarket instance variable:activea boolean variable that maintains the status of the account. Status isdefined as active if the balance is greater than a minimum balance of$500.00, otherwise is not active. Account status must be updatedevery time the account balance is changed. Withdrawals are notallowed if the account is not active, until deposits make the accountactive againMoneyMarket will have the following methods Be careful to implement the steps ofeach method in exactly the order given below:constructor-has parameters for account ID, the starting balance (in dollars) and annual interest rate-use the superclass constructor to set these-then set whether the account is active or not activewithdraw()-output a message in the following format if the account is not active, and done:MoneyMarket 456: Withdrawal not allowed-otherwise call Checking withdraw() (use super to do this), then must update the statusof the accountdeposit()-call Checking deposit() (use super to do this), then must update the status of theaccountprintMonthEnd()-run at the end of the month to add interest, deduct monthly service charges andsummarize the account. In pseudocode (implement these actions in exactly this order):3© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 5 Inheritanceadd a minimum balance fee of $5.00 to the monthly service fee if the account is notactivecall Checking monthEnd() (use super to do this)update status of the accountoutput the status of the account e.g."Money market account is: active" or"Money market account is: inactive"-an example of the printMonthEnd() output format for the MoneyMarket class:Account ID 456Balance is: $296.151 deposits, 1 withdrawalsMonthly service charge was: $6.35Money market account is: inactivetoString()-return a String that represents the MoneyMarket object, must be in standardizedformatting e.g.MoneyMarket[accountID=456, balance=30000, numDeposits=1,numWithdrawals=1, annualRate=0.1, serviceCharge=35][active=false]The Tester classThe Tester class tests your new Checking and MoneyMarket classes. Source code forTester is given below, and can be downloaded from Blackboard, Course Documents,Week 12, Example programs.import java.util.ArrayList;/*** Driver for Lab 5 Inheritance** @author Anthony W. Smith* @version 5/31/2028*/public class Tester{public static void main(String arg){// create some accounts// $100.00, 10.0% annual interestChecking check = new Checking("123", 100.0, 0.1);// $1000.00, 10.0% annual interestMoneyMarket money = new MoneyMarket("456", 1000.0, 0.1);4© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 5 InheritanceArrayList<Checking> accounts = new ArrayList<>();accounts.add(check);accounts.add(money);// do some transactionsSystem.out.println("Transactions");// on Checking objectcheck.deposit(750.0);check.withdraw(12.0);check.withdraw(34.0);check.withdraw(56.0);// on MoneyMarket objectmoney.withdraw(750.0);money.withdraw(100.0);money.deposit(50.0);// print accountsSystem.out.println("
Print accounts");for (Checking c : accounts)System.out.println(c.toString());// print month end reportSystem.out.println("
Month end report");for (Checking c : accounts) {c.printMonthEnd();System.out.println();}}}Hintsfirst, take a calculator and work carefully through Tester line by line, writing downon a piece of paper the values of the instance variables that should be produced…this makes sure you understand what every method does, and gives you the expectedoutput you need to test your programnow design your new Checking and MoneyMarket classes on a piece of paperuse inheritance – a MoneyMarket account is-a Checking account, with an accountstatus addeddesign algorithms, think about parameters and return valuesthen use BlueJ as usual to code and test each method in turn. Comment out in Testerthe methods you have not yet implemented5© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 5 InheritanceRequiredTester in your final submission must not be changed in any wayevery method must have a clear, meaningful Javadoc commenteach toString() is required to use standardized formattingautomatically and routinely use all the other components of simplicity and clarity, aslisted in Blackboard, Course Information, “How labs are graded”when you have thoroughly tested your program and are certain it is correct, save youroutput into the output.txt fileLab 5 submissiondeadline for this lab is 3 weeks, by end of Sunday 5/1zip your BlueJ project plus output.txt output file and email to me [email protected] will lose points if you do not include a file named output.txt containing theoutput of your programyour email Subject line must say ‘CSCI 114 Lab 5’ followed by your full name, sothat it filters to the correct email folder for gradingyou will lose points if you format your email Subject incorrectlye.g. my email Subject would be:CSCI 114 Lab 5 Anthony W. Smiththis is a graded lab, so a reminder that you may not copy code from other peoplereminder that late labs will be penalized 2 points per week or part of week late6

Order | Check Discount

Tags: best essay writing service tiktok, best essay writing service uk, best essay writing service uk trustpilot, best research paper writing service, Best Research Paper Writing Services in the U.S.

Assignment Help For You!

Special Offer! Get 20-25% Off On your Order!

Why choose us

You Want Quality and That’s What We Deliver

Top Skilled Writers

To ensure professionalism, we carefully curate our team by handpicking highly skilled writers and editors, each possessing specialized knowledge in distinct subject areas and a strong background in academic writing. This selection process guarantees that our writers are well-equipped to write on a variety of topics with expertise. Whether it's help writing an essay in nursing, medical, healthcare, management, psychology, and other related subjects, we have the right expert for you. Our diverse team 24/7 ensures that we can meet the specific needs of students across the various learning instututions.

Affordable Prices

The Essay Bishops 'write my paper' online service strives to provide the best writers at the most competitive rates—student-friendly cost, ensuring affordability without compromising on quality. We understand the financial constraints students face and aim to offer exceptional value. Our pricing is both fair and reasonable to college/university students in comparison to other paper writing services in the academic market. This commitment to affordability sets us apart and makes our services accessible to a wider range of students.

100% Plagiarism-Free

Minimal Similarity Index Score on our content. Rest assured, you'll never receive a product with any traces of plagiarism, AI, GenAI, or ChatGPT, as our team is dedicated to ensuring the highest standards of originality. We rigorously scan each final draft before it's sent to you, guaranteeing originality and maintaining our commitment to delivering plagiarism-free content. Your satisfaction and trust are our top priorities.

How it works

When you decide to place an order with Dissertation App, here is what happens:

Complete the Order Form

You will complete our order form, filling in all of the fields and giving us as much detail as possible.

Assignment of Writer

We analyze your order and match it with a writer who has the unique qualifications to complete it, and he begins from scratch.

Order in Production and Delivered

You and your writer communicate directly during the process, and, once you receive the final draft, you either approve it or ask for revisions.

Giving us Feedback (and other options)

We want to know how your experience went. You can read other clients’ testimonials too. And among many options, you can choose a favorite writer.