Rewrite a c++ program

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

I have Assign in C++ , I create evrething but my project not work also Iput it all documents.
==============================================================
Account cpp
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <string>
#include "Account.h"
using namespace std;
int main()
{
Accountacct01;
Accountacct02("Harold M. Ferguson", 2000);
Accountacct03("Elise Janet Simmons", 3500);
Accountacct04("James Holder", 0);
cout << endl << "Account information - initial" << endl;
acct01.displayAccountInfo();// show account information - initial values
acct02.displayAccountInfo();
acct03.displayAccountInfo();
acct04.displayAccountInfo();
acct01.setAccountHolder("Mary A. Tarleton");
acct01.setBalance(542.39);
acct04.setAccountHolder("James Ellis Holder");
acct04.setBalance(1990.75);
cout << endl << "Account information after changes" << endl;
acct01.displayAccountInfo();// show account information after changes
acct02.displayAccountInfo();
acct03.displayAccountInfo();
acct04.displayAccountInfo();
acct01.depositAmount(455);// make deposits
acct02.depositAmount(-19.95);// negative deposit not allowed - set to zero
acct03.depositAmount(4365.27);
acct04.depositAmount(95.63);
cout << endl << "Account information after deposits" << endl;
acct01.displayAccountInfo();// show account information after deposits
acct02.displayAccountInfo();
acct03.displayAccountInfo();
acct04.displayAccountInfo();
acct01.withdrawAmount(37.39);
acct02.withdrawAmount(-475.25);// withdrawal may be positive or negative (absolute value)
acct03.withdrawAmount(0.25);
acct04.withdrawAmount(50.00);
cout << endl << "Account information after withdrawals" << endl;
acct01.displayAccountInfo();// show account information after withdrawals
acct02.displayAccountInfo();
acct03.displayAccountInfo();
acct04.displayAccountInfo();
cout << endl;
system("pause");
return 0;
}
=====================================================================
Account.h
#ifndef ACCOUNT_H
#define ACCOUNT_H
#include <string>
using namespace std;
staticintaccountNumber = 100000;// starting value for account#
class Account
{
public:
Account();// default constructor
Account(string name, double amount);// constructor with two parameters
intgetAccountID()const;// ACCESSOR member functions
stringgetAccountHolder()const;// return name of account holder
doublegetBalance()const;// return account balance
voidsetAccountHolder(string name);// MUTATOR member functions
voidsetBalance(double amt);// assign amount to balance
voiddepositAmount(double amt);// add amount to balance
voidwithdrawAmount(double amt);// subtract absolute value of amount from balance
// HELPER member functions
voiddisplayAccountInfo()const;// display account information
private:
intgetNextAccountNumber()const;// get next account# (pre-increment account number)
// private DATA members
intaccountID;// account# identifier
stringaccountHolder;// name of account holder
doublebalance;// account balance
};
#endif
==================================================================
AccountClass
#include "stdafx.h"
#include "Account.h"
#include <iostream>
#include <iomanip>
using namespacestd;
Account::Account()
{
accountID = getNextAccountNumber();
accountHolder = "no name";
balance = 0;
}
Account::Account(string name, double amount)
{
accountID = getNextAccountNumber();
accountHolder = "no number";
balance = 0;
}

Reference no: EM13766168

Questions Cloud

Taxpayer spouse student loan : A new client approaches you and explains that after speaking to another tax preparer he is uncomfortable with the amount of gross income the tax preparer has calculated. Your new client explains that he asked the tax preparer for information on th..
Type of control used in programming : Loop statements are another type of control used in programming that allow programmers to interrupt the structural flow of a program.
How has the us'' adoption of functional managers : Explain how what Clark describes as strategies- to- task methodologies seek to allocate resources? How has the US' adoption of "functional managers" changed the way collection is planned and executed
Views concerning decriminalization of status offenses : Your individual work assignment is to complete and explore the following: Express your views concerning decriminalization of status offenses
Rewrite a c++ program : I have Assign in C++ , I create evrething but my project not work also Iput it all documents.
Environment of open communication : It is important for the leader to create an environment of open communication where ideas, solutions, and problems can all be discussed without fear. When employees understand that communication is open and encouraged, they will perform better.
It network consultant mainly switches and routers : You have been hired as an IT/ network consultant for a start-up company. The company, " Inetwork", sells used Cisco equipment
Attributes of the transformational style of leadership : What are the key attributes of the transformational style of leadership? Explain why you think these attributes are required of a transformational leader.
Differences between juvenile diversion and probation : Now that you are familiar with the juvenile correctional process write a 2 to 3 page APA-formatted paper discussing the differences between juvenile diversion and probation

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