Question
you have to design and implement a Simple accounts managing system which has three classes: 1. The Date class that includes three instance variablesa month
you have to design and implement a Simple accounts managing system which has three classes: 1. The Date class that includes three instance variablesa month (type int), a day (type int) and a year (type int). Provide a constructor that initializes the three instance variables and Provide a set and a get method for each instance variable. The values of instance variables must be validated. Provide a method toString that provide a string representation like 25/3/2019. 2. The Account class Design a class named Account that contains: An int data field named id for the account. A double data field named balance for the account. A Date data field named dateCreated that stores the date when the account was created. A no-arg constructor that creates a default account. Setter and getter methods for id, balance, dateCreated. A method named withDraw that withdraws a specified amount from the account. A method named deposit that deposits a specified amount to the account. 3. The AccountTest Class that should accomplish the following tasks: a. Firstly, the program displays a Welcoming message. b. Secondly, your program displays a list of options for a user to choose from, like the following: a. Create new account b. Search for account c. Withdraw from account d. Deposit to account e. exit c. Choosing Create new account, the program asks a user to enter accounts information. Account Id is automatically generated by the program on a sequential base starting at: 1. d. Choosing Search for account, the program asks a user to enter account id and the account information is displayed. e. Choosing Withdraw from account, the program asks a user to enter the account id, amount. The user can withdraw any amount from his account if only his balance is greater than the amount he entered. The new account is displayed on the screen. f. Deposit to account, the program asks a user to enter the account id, amount. The user can deposit any amount to his account. The new account is displayed on the screen.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started