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 mutatorsfor 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:
Next, create a text file named withdraw.txt. The file should contain the following numbers, one per line:
The numbers in the deposit.txtare the amount of deposits that were made to a checking account during the month. The numbers in the withdraw.txtare 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.txtfile and add them to the account balance. The program will also read the values from the withdraw.txtfile and subtract them from the account balance. The program then displays the monthly statement of the account.
Other samples, services and questions:
When you use PaperHelp, you save one valuable — TIME
You can spend it for more important things than paper writing.