Write the java code for an abstract class named account

Assignment Help JAVA Programming
Reference no: EM13781269

Write the Java code for an abstract class named Account which has two data members; one for the account number and the other for the account balance (use information hiding). The Account class should include get and set methods for both data members and a constructor that initializes the two data members from the values received in the parameter list. Create (override) the toString() method that returns a string indicating the account number and the account balance. In addition to these methods, the Account class will have one abstract method called calculateInterest. The calculateInterest method will take one argument representing the interest rate and will return an amount representing the interest calculated based on the balance.

In addition to the Account superclass, write the code for two subclasses: CheckingAcct and SavingsAcct. The CheckingAcct interest is calculated only if the account balance is over 700 dollars. The checking account should also be able to tell the user if cosignatories are required or not with the default being not required. The SavingAcct interest is calculated on any balance greater than zero. The SavingsAcct constructor should initialize its only data member called accumulatedInterest to zero. Assume the interest calculation is for the year and the rate is 7%.

Write the code for a class named TestAccounts that will create an array of 3 Account references, instantiates two CheckingAcct objects and one SavingsAcct object, and then assigns the CheckingAcct objects to the first two array elements to the array mentioned above, and the SavingsAcct object to the third. Create a loop that calls the calculateInterest method and then displays the interest for all three accounts using the array references.

Reference no: EM13781269

Questions Cloud

Wriyte an essay about the multiple meaning of family : Wriyte an essay about the multiple meaning of family.
Effect of fear-aggression-nervous system : Explain the role of the nervous system. Describe the effect of fear, aggression, or anxiety on the specified behavior.
Briefly define consideration and explain why it is important : Briefly define consideration and explain why it is important. Briefly identify and describe 2 advantages and 2 disadvantages of public corporations versus private closely held corporations
Write a paper about as chinas kite makers age : Write a paper about As China's kite makers age, lofty tradition goes to ground By Stuart Leavenworth, McClatchy Foreign Staff.
Write the java code for an abstract class named account : Write the Java code for an abstract class named Account which has two data members; one for the account number and the other for the account balance (use information hiding). The Account class should include get and set methods for both data membe..
Wayne winston on analytics : Write a 1- to 2-page proposal to your current or previous company discussing how analytics can be used in your company to improve sales through your retail outlets or customer service department. If you do not work in a retail company, then pick o..
Telephone crisis intervention hotline : In this discussion, you are the director of a 24 hour telephone crisis intervention hotline. Your staff of volunteers has been through a rigorous training in which you employed the concept of "overtraining" and required them to role play interveni..
Describe each organism and its environmental needs : Make a list identifying at least ten organisms-at least five plants and five animals-that live in your biome, and describe how these organisms interact with one another. For example, is the relationship competitive or symbiotic?
Describe the different perspectives on personality : Describe the different perspectives on personality - Explain how changeable or unchangeable you think personality is.

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