Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 399 Weeks Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 28 Jul 2017 My Price 11.00

Bank_Transaction

#include <iostream>

 

using namespace std;

 

class Bank_Transaction

{

public:

      Bank_Transaction( ); //default constructor

      Bank_Transaction(double);

      double Check_Balance( );

      void Deposit(double);

      void Withdrawal(double);

private:

      double balance;

};

 

 

Bank_Transaction::Bank_Transaction()

{

      balance = 0;

}

 

Bank_Transaction::Bank_Transaction(double amount)

{

 

      balance = amount;

}

 

 

double Bank_Transaction::Check_Balance()

{

      return balance;

}

 

void Bank_Transaction::Deposit(double amount)

{

      balance = balance + amount;

}

 

void Bank_Transaction::Withdrawal(double amount)

{

      balance = balance - amount;

}

 

int main()

{

      Bank_Transaction my_Acct;

      Bank_Transaction your_Acct(10340.85);

 

      cout<<"Your Account Balance = "<<your_Acct.Check_Balance()<<endl;

      your_Acct.Deposit(512.30);

      cout<<"Your Account Balance = "<<your_Acct.Check_Balance()<<endl;

      your_Acct.Withdrawal(8284.56);

      cout<<"Your Account Balance = "<<your_Acct.Check_Balance()<<endl;

 

 

      cout<<"My Account Balance = "<<my_Acct.Check_Balance()<<endl;

      my_Acct.Deposit(2516.83);

      cout<<"My Account Balance = "<<my_Acct.Check_Balance()<<endl;

      my_Acct.Withdrawal(25.96);

      cout<<"My Account Balance = "<<my_Acct.Check_Balance()<<endl;

 

      return 0;

}

 

Question 1:Write the statement(ie. the actual line of code) in the program in Step 2 that initializes the balance of the object A????1your_AcctA????1.

 

 

 

Question 2:Give the full name of the function(This is also referred to as the function header) and state the type of the constructor that initialized the object A????1your_AcctA????1.

 

 

 

 

Question 3:What happens if you add the statement A????1my_Acct.Balance = 0;A????1 to the main function of the program in Step 2 after the object declarations? Explain your answer.

 

 

 

            Question 12:    What do we mean when we use the following phases?

                                    a. Inside the class

                                    b. Outside the class

Answers

(5)
Status NEW Posted 28 Jul 2017 12:07 AM My Price 11.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------sol-----------uti-----------on.-----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- ca-----------tch-----------

Not Rated(0)