Question: Your task is to create simple deposit/credit calculator for different type of banks; Structure of your project is following: Package Bank: Calculator.java, National Bank.java,


 Your task is to create simple deposit/credit calculator for different type of

Your task is to create simple deposit/credit calculator for different type of banks; Structure of your project is following: Package "Bank": Calculator.java, National Bank.java, Second TierBank.java; root of src folder: "main.java"; More in details about each java file: 1. main.java You are going to use your main class in order to test your application (creation of necessary objects, method invocation and so on) and to provide user with simple interaction via console (use "switch" to choose between options/invocation of certain methods with necessary parameters that you will get from scanner); 2. NationalBank.java Has fixed field fixed BankReward which is equal to 1% (think about how to make that field constant and about its data type); field is private; reward is given for deposits that longer than a year; Has reference to instance of Calculator object which is instantiated within the constructor of National Bank class; field is private; Has method "calculateDeposit" which calculates deposit revenue for a different type of clients: "individual" and "legalEntity"; since we don't have such objects for clients, think which data type to choose; method should be safe from overriding Method also gets amount of money, and duration in months as parameters; However, whole calculations proceed on Calculator object; Has method "calculateCredit" which calculates amount of credit return for a different type of clients: "individual" and "legalEntity"; since we don't have such objects for clients, think which data type to choose; method could be overridden; Method also gets amount of money, and duration in months as parameters; However, whole calculations proceed on Calculator object; 3. Second TierBank.java Class extends from NationalBank.java; Has fixed field fixed BankReward which is equal to 2% (think about how to make that field constant and about its data type); field is private; reward is given for deposits that longer than a year; Has fixed field fixed InterestRate which is equal to 3% (think about how to make that field constant and about its data type); field is private; field is used in calculation of credits; Has reference to instance of Calculator object which is instantiated within the constructor of Second TierBank class; field is private; Inherits method "calculateDeposit"; Inherits and overrides method "calculateCredit" which calculates amount of credit return for a different type of clients: "individual" and "legal Entity"; since we don't have such objects for clients, think which data type to choose; Method also gets amount of money, and duration in months as parameters; However, whole calculations proceed on Calculator object then uses fixed InterestRate to return overall sum; 4. Calculator.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

basic implementation of the required classes based on your specifications Calculatorjava package Bank public class Calculator public double calculateDepositdouble amount int durationMonths double inte... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!