Description of this paper

Java CheckingAccount

Description

solution


Question

Consider a CheckingAccount class, which has the following fields: acctNo, name, balance, status, which represents an active or inactive account, minimum balance, and service charge. If the balance of a checking account falls below the minimum balance, it becomes inactive. No withdrawals may be made until balance is raised above the minimum balance, at which time the account becomes active again. Create appropriate consturctors, accessors, and mutators for the CheckingAccount class. The class should also include the following methods;? withdraw: a method that determines whether the account is inactive before a withdraw is made. (No withdraw will be allowed if the account is not active.) A withdrawal is then made.;? deposit: a method that determines whether the account is inactive before a deposit is made. If the account is inactive and the deposit brings the balance over the minimum balance, the account becomes active gain. A deposit is then made.;? getMonthlyStatement: a method that prints the account information at the end of each month. If the balance in the account were less than the minimum balance requirement, service fee would be charged.;Use notepad or another text editor to create a text file named deposit.txt. The file should contain the following numbers, one per line;100.00;124.00;78.92;37.45;Next, create a text file named withdraw.txt. The file should contain the following numbers, one per line;29.23;78.12;100.00;48.78;23.87;50.2;The numbers in the deposit.txt are the amount of deposits that were made to a checking account during the month. The numbers in the withdraw.txt are the amount of withdraws that were made to a checking account during the month. Write a program that creates a CheckingAccount object, with starting balance 100. The program should read the values from the deposit.txt file and add them to the account balance. The program will also read the values from the withdraw.txt file and subtract them from the account balance. The program then displays the monthly statement of the account.

 

Paper#68199 | Written in 18-Jul-2015

Price : $27
SiteLock