Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the Java Class, Account.java, provided. Please do not rename or make any changes to this class. Assigned date: 3/20 Due Date: 4/3 Concepts: Classes

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedUse the Java Class, Account.java, provided. Please do not rename or make any changes to this class.

Assigned date: 3/20 Due Date: 4/3 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 my own copy of the Account class provided (which is the same as yours) 1. Write a Java class, XXXX_Bank, where XXXX where XXXX 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, accounts 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. It will create the Array of Account objects ii. Set the numberOfAccounts to zero b. One accessor method: (5 points) public int getNumberOfAccountsO //returns the numberOfAccounts C. The following methods public void addAccount (Account a) (5 points) .Adds Account a to the Array of accounts Adds 1 to the numberOfAccounts public void addAccount(double initBalance) (5 points) Creates a new Account using initBalance Adds the new Account to the Array of accounts Adds 1 to the numberOfAccounts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

Students also viewed these Databases questions