Skip to content

blackmonoceros/fun_with_java-tbc1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation


We create two classes: Account and Savings. The Account class has private fields Account number and balance, and the constructor and methods for deposit and withdrawal. The Savings class inherits from the Account class and adds an additional field: interest rate and accrueInterest() for special calculation. The constructor of the Savings class uses the constructor of the base Account class. The main method contains the Account and Savings object classes, and then the methods are called deposit, withdrawal and basic accrual. At the end, the balances of both accounts on the screen are taken out.

About

create

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages