Make a constructor taking these three data items as input
Make a str/toString method to show data properly
Add a deposit function that takes an integer as input and adds to the balance
Add a withdraw method that allows withdrawing money from the balance.
Validate properly
A Bank with multiple accounts
Add a menu based system like this 0-Exit,1-create account,2-deposit,3-withdraw,4-show balance
Store accounts in an array. Use the previous account class.
Time class
Make a class called time that takes as input hour and minute in 24hrs format and then prints it in 12hrs format. Eg 11:45= 11:45 AM, 12:45 = 12:45 PM, 13:45 = 01:45 PM.
Single digit must always be preceded with 0 7:8 will be 07:08 AM
0 Comments