Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Create an Inheritance hierarchy that a bank may use to represent customer's bank accounts (Checking and Savings).
All the bank customers can deposit (Credit) money into their account and/or withdraw (debit) money from their account.
Create necessary classes and Java application to use and test these classes.
Savings Accounts - earn interest on the money in the account.
Checking accounts - charges a fixed fee for each transaction the customer makes.
Create base class Account, with derived classes SavingsAccount and CheckingAccount that inherit from Account
Account:contains - initialBalance
Constructors, getter/setters
validation for initialBalance,
credit() - make input is correct and positive and credit the account
debit() - make sure there is enough money, otherwise it should left unchanged
Account:SavingsAccount
Inherit from Account
additional property called interestRate (percentage assigned to account)
SavingsAccount Constructor should receive initialBalance, value for interestRate
method calculateInterest() that returns the amount of interest
CheckingAccount
Inherit from Account
additional instance variable for fee charged per transaction
Constructor should receive the initialBalance and fee amount
Should redefine debit () and credit () to take under consideration the fee charged
Now create and application that creates objects of each class to test each method.
Add interest to the savingsAccount object by first invoking its caculateInterest () method, then pass the returned interest amount to the object's credit () method.
Develop a polymorphic banking application using the Account hierarchy. Create an array of Account references to SavingsAccount and CheckingAccount objects.
For each account in the array, allow the user to specify an amount of money to withdraw from the account using method debit() and an amount to deposit into the account using the method deposit().
As you process each Account, determine its type.
If an account is a SavingsAccount, calculate the amount of interest owed to the Account using method calculateInterest(), then add the interest to the account balance using method credit().
After processing an Account, print the updated balance obtained by using the getBalance() from the base class.
Interactively ask the user for information for each account and then print the result for each account.
Create Custom Exception NegativeBalanceException for the cases when user try to withdraw amount beyond available balance.

Java, Programming

  • Category:- Java
  • Reference No.:- M92394984
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Java

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As