Question: For this assignment you are to develop a class that models a bank account. As part of the class definition, create instance variables and class



For this assignment you are to develop a class that models a bank account. As part of the class definition, create instance variables and class (static) variables as required. For each individual bank account, the class should be able to keep track of the: . account number current balance interest rate Each bank account should have its own unique account number assigned to it when the account is created. Account numbers should be integer values ranging from 1000 9999. The first account created should be assigned the number "1000", the second should be assigned the number "1001", the third should be assigned the number "1002", etc. The class should be designed to ensure that no two accounts are ever assigned the same account number. A constructor for the class should be provided that allows values to be specified for the current balance and interest rate when a new account is created. The constructor should also assign a unique account number to each new account as it is created. A toString) method for the class should be provided that returns a reasonable string representation of a bank account including the account number, current balance, and interest rate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
