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 10 Account or CDAccount objects randomly.
(accountID from 1001~ 1010, and generate the initial balance and CDAccount duration randomly)
2. Use a for-loop to invoke toString() method through the Account object reference to display account information. After withdraw $500 and deposit $1000 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.)
3. 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 (Account.java, CDAccount.java, and LabExercise7.java) and screenshots of test runs.
Comment your name and ID in the first line of each source file.
 Before start working on this Lab Exercise, you may need to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!