Create an inheritance hierarchy

Assignment Help JAVA Programming
Reference no: EM131586270

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.

Reference no: EM131586270

Questions Cloud

Expected capital appreciation : A stock currently sells for $50 per share has a 12% expected total return and a 7% expected capital appreciation. What is the expected dividend?
Define was the police response justified : Do you feel the response was justified by the public. Was the police response justified. Why or why not. Be elaborate
How has your learning from the given experience influenced : How has your learning from this experience influenced what you will do going forward through your doctoral study process?
Annual interest rate compounded monthly : How much interest is to be paid in the second year of a 6-year loan of $100,000 with payments occurring at the end of each month, and a 6% annual interest rate?
Create an inheritance hierarchy : Create an Inheritance hierarchy that a bank may use to represent customers bank accounts - charges a fixed fee for each transaction the customer makes
Amount as in the previous question : Using the same mortgage amount as in the previous question how much higher or lower would be your monthly payment under a 15-year mortgage
Describe what sir robert peel implemented his nine principle : describe what Sir Robert Peel implemented his Nine Principles to give guidance to the newly formed New Westminster Police Service
Create a values conflict among stakeholders : In these situations, a conflict develops between the personal moral philosophy of the employees and the organization's goals or culture.
Implement classes and testing : CSE110 - Write a class definition (not a program, there is no main method) named Geek (saved in a file Geek.java) that models a person who is a geek

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd