Java: Please write in Java 1. Create a checking account class with three attributes: account number, owner’s name, and b
Posted: Fri Jul 01, 2022 5:35 am
Java: Please write in Java
1. Create a checking account class with three attributes:account number, owner’s name, and balance.
2. Create constructor, getters and setters. If one is to set theinitial balance of an account as a negative value in a setter or aconstructor, remind the user about the error and set it as 0.
3. Create a CheckingAccountDemo class, and create a main methodin which
a. Ask for thename, account number, and initial balance for one account from thekeyboard input. With these input values as arguments in a call tothe constructor, create a CheckingAccount object.
b. Print thesummary of this account that includes information on the name,account number, and balance by calling the getters.
Test cases: at least two cases, in one case input positivebalance and in the other case input negative balance
1. Create a checking account class with three attributes:account number, owner’s name, and balance.
2. Create constructor, getters and setters. If one is to set theinitial balance of an account as a negative value in a setter or aconstructor, remind the user about the error and set it as 0.
3. Create a CheckingAccountDemo class, and create a main methodin which
a. Ask for thename, account number, and initial balance for one account from thekeyboard input. With these input values as arguments in a call tothe constructor, create a CheckingAccount object.
b. Print thesummary of this account that includes information on the name,account number, and balance by calling the getters.
Test cases: at least two cases, in one case input positivebalance and in the other case input negative balance