Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need this code written using classes ..... ASAP I am so lost! Steps for comple

ID: 3537709 • Letter: I

Question

I need this code written using classes ..... ASAP I am so lost!

Steps for completing iLab 6 Automated Teller Machine

Create an empty console project with the name CIS170C_iLab6_yourname

1. Add a new item: a .cpp file called TestMenu.cpp which will contain main

2. Add a new item: a .h file called BuildMenu.h which will contain the class header

3. Add a new item: .cpp file called BuildMenu.cpp which will contain the implementation of the

methods

4. Alternately to 2 and 3, add a new Class. Double click the name box and in the popup box type

the name of the class %u2013 unclick the %u201Cmanaged%u201D box

The files contain what is specified below

MenuBuilder.h

Contains the usual preprocessor commands for iostream, iomanip, string and using namespace std

(these will get included into main when the header is included in the TestMenu file)

Contains the class header

1. One data member of type double to hold the balance in the private section

2. A prototype for a constructor in the public section- %u2013 ours has no parameter

(a constructor has the same name as the class and no return type)

3. A prototype for a destructor

(a destructor has a ~ in front of the class name and no return type and no parameters)

4. A prototype for buildMenu which returns void and take no parameters

5. A prototype for processInput which returns void and takes one integer parameter

MenuBuilder.cpp

Contains a statement to include the MenuBuilder header file.

Contains the following methods (functions)

Constructor

%uF0B7 Assigns a value to balance

Destructor

%uF0B7 For this program it is empty

buildMenu()

%uF0B7 Outputs the list of menu items (it only outputs this %u2013 don%u2019t do other stuff)


Contains two local variables of type double for withdrawal and deposit

Contains a switch statement that will process the user input that was passed in as a parameter

1. outputs the current balance which is stored in the class data member

2. ask the user how much s/he wants to withdraw

accept input

if the balance is greater than the withdrawal amount

and the withdrawal amount is greater than zero

subtract the withdrawal amount from the balance

show balance after withdrawal

otherwise

notify user of invalid withdrawal

3. ask the user how much s/he wants to deposit

accept input

if the deposit amount is greater than zero

add the deposit amount from the balance

show balance after deposit

otherwise

notify user of invalid deposit

4. output account info (name and account number);

use your name and some number

5. output statement

use what is output in the example

6. output Bank information

use what is in the output in the example

7. Exit the program

Default: tell the user the entry is invalid


TestMenu.cpp

Include the MenuBuilder.h file

Declare a variable of type integer to hold the user%u2019s choice of menu item

Instantiate a MenuBuilder object

While the user does not choose to exit (7)

Call buildMenu (using the object and the dot operator) to print the main menu

accept menu choice

call processInput (using the object and the dot operator and passing input as a parameter)

end of the while loop

Sample output from the program as I ran it

/*

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

1

Current balance is: $2439.45

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

2

How much would you like to withdraw? $200

Current balance after withdrawal is: $2239.45


Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

3

How much would you like to deposit? $188

Current balance after Deposit is: $2427.45

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

4

Name: Herman Devry

Account Number: 1234567890

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

5

01/01/11 - McDonald's - $6.27

01/15/11 - Kwik Trip - $34.93

02/28/11 - Target - $124.21

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal


3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

6

DeVry Bank, Established 2011

(123)456-7890

12345 1st St.

Addison IL 12345

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

8

Please enter valid input

Welcome to the DeVry Bank Automated-Teller-Machine

1. Check Balance

2. Make Withdrawal

3. Make Deposit

4. View Account Information

5. View Statement

6. View Bank Information

7. Exit

7

Good-bye

Press any key to continue . . .

Explanation / Answer

#pragma once #include #include #include using namespace std; class MenuBuilder { private: double balance; // private data member public: MenuBuilder(); ~MenuBuilder(); // methods void buildMenu(); void processInput(int); }; #include "MenuBuilder.h" // constructor MenuBuilder::MenuBuilder(void); { balance = 2439.45; } // deconstructor MenuBuilder::~MenuBuilder(void) { } // output the menu void MenuBuilder::buildMenu() { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote