Question: Java Code Concepts: Classes and objects, relationships between objects, array of objects Point value: 100 points Note: Use the Java Class, Account.java, provided. Please do
Concepts: Classes and objects, relationships between objects, array of objects Point value: 100 points Note: Use the Java Class, Account.java, provided. Please do not rename or make any changes to this class. Do not turn in the Account class. Your program will be tested with the Account class provided. 1. Write a Java class, XXXx_Bank, where XXXX where XXX is your Kean email id. (5 points) 2. At the beginning of the program include a comment with your name and a brief description of the program. Please include a short comment before each method (5 points) 3. The Bank class will have the following instance variables: (5 points) a. An Array of Account objects that can hold 20 Accounts named, bank. b. An int variable, numberOfAccounts which indicates the number of Account objects in the account array 2. The Bank class will have the following constructor: a. A defaultoargs constructor: (5 points) i. ii. It will create the Array of Account objects Set the numberOfAccounts to zero b. One accessor method: (5 points) public int getNumberOfAccounts) //returns the numberOfAccounts c. The following methods: public void addAccount (Account a) (5 points) Adds Account object, a, to the Array of accounts Adds 1 to the numberOfAccounts public void addAccount(double init Balance) (5 points) Creates a new Account using initBalance
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
