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

  Designing navigation system for point-and-click system

Design a navigation system or menu allows Access to act like point-and-click system. Write down some of the kinds of navigation.

  Different class maintain programming programs are organized

It allows different classes to maintain programming so that programs are kept more organized. Object orientation also allows a programmer to use the same objects in different programs. Response?

  Prepare a presentation on backgrounds and fonts

Can you still read the text? Is it too narrow or thick? Is an icon hidden by the background? You should also include tips for choosing backgrounds and fonts.

  Program-visual basic to compute tips for services rendered

Write a program in Visual Basic 2010 to compute tips for services rendered. The program should request the person's occupation, the amount of the bill and the percentage tip

  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.

  Program to write variable declarations and function calls

Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts.

  Write script to declare and sets variable equal to balance

Write a script that declares and sets a variable that's equal to the total outstanding balance due. If that balance is greater than $10,000.00, the script should return a result set consisting of VendorName.

  Write a program to calculate diameter in centimeters

Write a program to compute the diameter in centimeters of steel rod, aluminum rod, adn copper rod, which can withstand a particular compression load.

  Create a java application for employee class

Create a Java application, that support the following:- Create an Employee class, which holds following information: Employee First Name, Employee Last Name.

  Write a trigger for total percentage of all appointments

Write a trigger on Works department to ensure the following requirement; the total percentage of all appointments for an employee must be fewer than 100%.

  Distinguishing web pages or web servers for task

Distinguish between any Web pages or Web servers you would use for this task.

  Designing the site links

Company needs to be able to schedule the time of day when the connections are available for replication. Replication should not occur during peak business hours. When designing the site links, which of the following options should you use?

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