Answered You can hire a professional tutor to get the answer.

QUESTION

Since the question has recently been flagged. this is copy of my code. // // // lab17.cpp // // Created by James Maupin Jr. on 7/3/18.

First here is a copy of the assignment. Since the question has recently been flagged.

this is copy of my code.

//

//

// lab17.cpp

//

// Created by James Maupin Jr. on 7/3/18.

// Copyright © 2018 James Maupin Jr. All rights reserved.

//

// This excercise simulates managing a simple bank account.

//

//***********************************************************************

// The contents of Account.h

// This is the specification file that contains the class declaration.

//***********************************************************************

//

#include <string>

using namespace std;

class Account

{

public:

  BankAccunt();    // default constructor

  BankAccount (double balance, double interestRate, int accountNumber, string onwerName);

  displayAccountSummary();

  double getBalance();

  void deposit (double);

  void withdraw (double);

  void addInterest();

private:

  double balance;

  double interestRate;

  string ownerName;

  int accountNumber;

};

//************************************************************************

// Contents of Account.cpp

// This is the implementation file that contains the function definitions

// for the class member functions.

//************************************************************************

#include <string>

#include <iostream>

using namespace sdt;

#include "Account.h"

BankAccount::BankAccount()

{

  balance = 0;

  accountNumber = 0;

  ownerName = " ";

  interest = 0;

}

BankAccount::BankAccount (double balance, double interestRate, int accountNumber, string ownerName)

{

  balance = balance;

  accountNumber = accountNumber;

  ownerName = ownerName;

}

displayAccountSummary::displayAccountSummary()

{

  cout << "Account Number: " << accountNumber << endl;

  cout << "Owner's Name : " << ownerName << endl;

  cout << "Balance    : " << balance << endl;

  cout << "Interest rate : " << interestRate << endl;

}

double Account::getBalance()

{

  return balance;

}

void Account::deposit(double deposit)

{

  balance = balance + deposit;

}

void Account::withdraw(double withdraw)

{

  balance = balance - withdraw;

}

void Account::addInterest(double addInterest)

{

  balance = balance * (1 + interestRate);

}

//************************************************************************

// Contents

//************************************************************************

#include <string>

#include <iostream>

using namespace std;

#include "Account.h"

int main()

{

  BankAccount myAccount(1000.50,05,1111,"John William");

  myAccount.deposit(500);

  myAccount.withdraw(200);

  myAccount.addInterest();

  myAccount.displayAccountSummary();

  return 0;

}

I can't understand want the following error message means:

"! C++ requires a type specifier for all declarations"

this appears for the following line of code

BankAccount();

BankAccount (double balance, double interestRate, int accountNumber, stirng onwerName);

displayAccountSummary();

also the compiler states, it cannot find this

'Account.h'

file.

Sorry if you feel i have possibly violated your policy.

thanks James

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question