Question: Before start working on this Lab Exercise, you may need to consider the following questions. Share your answer in the discussion with other classmates. How
Before start working on this Lab Exercise, you may need to consider the following questions. Share your answer in the discussion with other classmates.
How to randomly create Account or CDAccount object?
How to generate the initial balace and CDAccount duration randomly?
Use the Account and CDAccount classes files from the prior assignments.
Perform the following tasks In the driving program,
Create an Account array to store Account or CDAccount objects randomly.
accountID from ~ and generate the initial balance and CDAccount duration randomly
Use a forloop to invoke toString method through the Account object reference to display account information. After withdraw $ and deposit $ on each account, display the account information again. Or you don't need to invoke the toString method, simply display all objects from the Account array. The toString method will be invoked by default.
The toString method which inherited from the Object class in the Account class returns a string of the account number and balance; for CDAccount class, the toString returns a string of the account number, initial balance, duration, mature balance, and Date created.
Modify the toString methods in the Account class, and CDAccount class from the previous assignment if necessary.
Submission: Submit your source codes Accountjava, CDAccount.java, and LabExercisejava and screenshots of test runs.
Comment your name and ID in the first line of each source file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
