Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA (mac terminal) blackboard.kean.edu Program4(1).pdf me Tools Program4(1).pdfx 1 4 Account class provided. Write a Java Program that mects 1. Write a Java class, XXxx

JAVA (mac terminal)
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
blackboard.kean.edu Program4(1).pdf me Tools Program4(1).pdfx 1 4 Account class provided. Write a Java Program that mects 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 variabtes: (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 4. The Bank class will have the following constructor: a. A defaultoargs constructor: (S points) i. It will create the Array of Account objects i. 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) (s points) Adds Account object, a, to the Array of accounts . Adds 1 to the numberOfAccounts public void addAccount (double initBalance) (5 points) Creates a new Account using initBalance . Program4(1).pdf x 3 14 49.3% CPS 2231 Computer Organization and Programming Spring 2019 f. Readability and indentation: Code should be easy to read and properly indented Variable names should be descriptive. (5 points Enter a balance 100 Enter a balance 200 Enter a balance 300 Enter a balance 400 Enter a balance S00 The accounts in the Bank are Account ID: 1 Balance: 100.0 Date Created Sun Mar 20 10:18:17 EDT 2016 Account ID: 2 Balance: 200.0 Date Created Sun Mar 20 10:18:18 EDT 2016 Account ID: 3 Balance: 300.0 Date Created Sun Mar 20 10:18:19 EDT 2016 Account ID: 4 Balance: 400.0 Date Created Sun Mar 20 10:18:20 EDT 2016 Account ID: 5 Balance: 500.0 Date Created Sun Mar 20 10:18:22 EDT 2016 The total balance in the bank is 1500.0 The account with the highest balance in the bank is Account ID: 5 Balance: 500.0 Date Created Sun Mar 20 10:18:22 EDT 2016 49.3% CPS 2231 Computer Organization and Programming Spring 2019 Points poss Points sible earned Requirement Name of both classes start with XXXX as required Comments at beginning of class including student' name and before each method Instance variables of Bank Constructor of Bank getNumberOfAccounts addAccount (Account a) addAccount (double initialBalance) etTotalBalance() etMaxBalanc toString method of Bank Create a Bank Object L oop to get info and add Account Using getTotalBalance() Using getMaxBalance() Prompts and outputs as in sample Readability and indentation Total Points earned

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_2

Step: 3

blur-text-image_3

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions