Design classes account-checkingaccount and savingsaccount

Assignment Help Programming Languages
Reference no: EM1363905

Design and write 3 classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account. In Account, you should include an account number, an account balance, a deposit and toString method, and an abstract withdraw method. Since deposits work the same way in both child classes, make sure they cannot override it. The constructor should only take an initial deposit and generate a random 5 digit account number. The toString should display the account number and the balance. Use a NumberFormat object to format the balance.

In the CheckingAccount class add a minimum balance and overdraft fee. Implement the withdraw method so that overdrafts are allowed, but the overdraft fee is incurred if the balance drops below the minimum balance. Override the toString method to display everything the Account toString displays plus the minimum balance. Use the parent class toString to do most of the work. You should not need a NumberFormat object in this method.

In the SavingsAccount class add an annual interest rate and a method to recalculate the balance every month. Since the interest rate is annual, make sure to calculate the interest accordingly. Override the toString method to display everything the Account toString displays plus the interest rate. Like the CheckingAccount toString, you should use the parent class to do most of the work and should not need a NumberFormat object.

Create a driver class to instantiate and exercise each of the account types.

Reference no: EM1363905

Questions Cloud

Define the magnitude of the average force : find out the z-component of the block's momentum after the kick.
Design algorithm to produce list of customers : Design an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file. Each record on the customer master file contains the customer's number.
Portfolio management presentation : What are the benefits of portfolio management and How is it being applied - how many organizations are applying the techniques successfully?
Reviewing and analyzing the income statement : Determine which type of stock would an investor purchase if he or she were primarily interested in a safe investment and what do stockholders look for when reviewing and analyzing the income statement.
Design classes account-checkingaccount and savingsaccount : Design and write 3 classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account.
What is the maximum load for the crane : The arm of a crane at a construction site is 14.4 m long, and it makes an angle of 40° with the horizontal. Assume that the upmost load the crane can handle is limited by the amount of torque the load produces at the base of the arm.
Center for holistic urology : Research from the Center for Holistic Urology and elsewhere strongly suggests that if every man who was told to "watch and wait" entered into a focused chemoprevention program
Define beta and its importance : Some believe that equity financing common stock aside from dividend payments is free financing for the company. Do you agree? explain your reasoning.
Creating a positive learning environment : In your opinion, what are some of these characteristics and why are they important in creating a positive learning environment? At least 150-200 words.

Reviews

Write a Review

Programming Languages Questions & Answers

  Design recursive program to generate random blurbs

A Whoozit is the character 'x' followed by zero or more 'y's. A Whatzit is a 'q' followed by either a 'z' or a 'd', followed by a Whoozit. Design and implement a recursive program that generates random Blurbs in this alien language.

  Explaining graphics as user experience on web sites

Graphics provide significant richness to the user experience on web sites. Discuss how each of these sites uses graphics in good or poor ways.

  Function to retrieve each of the private data members

Write a class called "Date" with month, day and year as private members. Have constructor that sets default date to 1st January 2000. Have accessor function which retrieves each of the private data members.

  Implement class to simulate growth of roach population

Implement a class RoachPopulationthat simulates the growth of a roach population. The constructor takes the size of the initial roach population.

  Use a two dimensional array to solve problem

Use a two dimensional array to solve the following problem. A company has four salespeople ( 1 to 4) who sell five different products ( 1 to 5).

  Program to print chains of numbers within a range

Write a program to print the chains for the numbers within a range that the user specifies.

  Develop the algorithms needed for designer robot

You have been hired as a system designer to develop the algorithms needed for a designer robot that can paint different patterns on the floor based on the commands it receives.

  Top-down recursive descent parser

Write a hand-coded top-down recursive descent parser.

  Program to prompts user for integer and print prime number

Give a program which will compile in VS 2010. Write a program to prompts user for integer and then prints out all prime numbers up to that integer.

  Benefits of validating the forms

When you are collecting data, you need to consider what data to collect, why you are collecting the data. What are other benefits of validating your forms? How are forms validated? What are some form validation best practices?

  Write program to allow two users to play tic-tac-toe

Write a program that will allow two users to play tic-tac-toe. The program should ask for moves alternately from player X and player O.

  Design implement application displays button-label on screen

Design an implement an application that displays a button and a label on a screen. Every time the button is pushed, the label will display a random number.

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