Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,


 image text in transcribed

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

Step: 1

basic implementation of the required classes based on your specifications Calculatorjava package Bank public class Calculator public double calculateDepositdouble amount int durationMonths double inte... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis And Decision Making

Authors: Christian Albright, Wayne Winston, Christopher Zappe

4th Edition

538476125, 978-0538476126

More Books

Students also viewed these Programming questions

Question

L A -r- P[N]

Answered: 1 week ago