Write a test program that creates an account object

Assignment Help C/C++ Programming
Reference no: EM13693249

The Account class

Design a class named Account that contains:

  • a private int data field named id for the account (default 0)
  • a private double data field named balance (default 0)
  • a private double data field named annualInterestRate (default 0). Assume all accounts have the same interest rate.
  • a private Date data field named dateCreated that stores the date when the account was created
  • A no-arg constructor
  • A constructor that creates an account with the specified id and balance
  • Accessor and mutator methods for id, balance and annualInterestRate
  • accessor method for dateCreated
  • a method called getMonthlyInterest() that returns the monthly interest (calculated as balance* monthlyInterestRate. monthlyInterestRate is annualInterestRate/12. annualInterestRate is a percentage like 4.5%)
  • a method called withdraw that withdraws a specified amount from the account
  • a method called deposit that deposits a specified amount to the account

Program: Write a test program that creates an Account object with an ID of 1122, a balance of 20000USD, and an annual interest rate of 4.5%.

Use the withdraw method to withdraw 2.500USD, use the deposit method to deposit 3000USD and print the balance, monthly interest and the date when the account was created.

Can you give the answer ASAP and there is no word limit?

Reference no: EM13693249

Questions Cloud

Compound operators or arithmetic assignment operators : Rewrite the given assignment statement using a combined assignment operator: (Use single spaces between operands and operators)
The empirical formula of the gasoline additive : The products of the combustion were 7.799 g of CO2(g) and 3.990 g of H2O(g). Insert subscripts below to appropriately display the empirical formula of the gasoline additive
Write a header for the pow function : Write a header for the pow function that returns a double and takes two parameters a double named base and an integer named exp.
What is the average atomic mass of br : Problem- Bromine has two isotopes of 78.918 u (50.69%) and 80.916 u (49.31%). What is the average atomic mass of Br
Write a test program that creates an account object : Write a test program that creates an Account object with an ID of 1122, a balance of 20000USD, and an annual interest rate of 4.5% - Use the withdraw method to withdraw 2.500USD, use the deposit method to deposit 3000USD and print the balance, mont..
Calculate the ph after the addition of 11.1ml of base : Part 1) How many milliliters of base are required to reach the equivalence point? Part 2) Calculate the pH after the addition of 11.1mL of base
What is the heat of reaction in kj : Assume the density of all the solutions is 1.0 g/mL, the specific heat of the aqueous solutions and mixture is the same as water, and the volumes are additive. What is the heat of reaction in kJ
Consider an isolated n-c bond in an organic compound : Problem- Consider an isolated N-C bond in an organic compound. Based on the electronegativities of the two elements, which of the following best describes the net charge on the carbon atom
Data set containing an unknown number of integers : The program should use I/O redirection to accept a file defined by the user which is a data set containing an unknown number of integers. The integers should be stored in an array, and printed to an output file - also defined by the user through r..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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