Create a class called Account that contains: • An int data field named id that stores the accounts unique identification number. • A double data field named balance that stores the current balance of the account. • A Date data field named dateCreated that stores the date on which the account was created. • A constructor that creates an account with the specified id and initial balance. • Methods that return the values of all data fields. • Methods that set the values of the id and balance data fields. • A method named withdraw that withdraws a specified amount from the Account. • A method named deposit that deposits a specified amount into the account. • A method named printStatement that print the user statement.
Create a class called Account that contains: • An int data field named id that stores the accounts unique identification number. • A double data field named balance that stores the current balance of the account. • A Date data field named dateCreated that stores the date on which the account was created. • A constructor that creates an account with the specified id and initial balance. • Methods that return the values of all data fields. • Methods that set the values of the id and balance data fields. • A method named withdraw that withdraws a specified amount from the Account. • A method named deposit that deposits a specified amount into the account. • A method named printStatement that print the user statement.
Step by step
Solved in 3 steps with 2 images