subject

This is an early object oriented C++ problem. Thanks Create an Application (BankApp) that perform the following activities:
Request the name of the Account Owner (String) and Balance (double) using cin.
The Application must create and 2 instances of the class BankAccount: the first instance will pass the Owner name and Balance the constructor. The second instance will pass only the name.
In order to test the second instance you will have to set your balance using the SetBalance method.
The App must invoke the 2 functions (WithDraw and Deposit) from the BankAccount.
The Application must print out the Owner name, previous balance, and current balance after a withdraw, and a deposit. In order to get Owner name and Balance the Application must invoked the GetName and GetBalance method from the BankAccount class.
2. The class BankAccount (create class in the same BankApp application) must have the following requirement:
The class must have 2 have 2 private class variables: name (String) and balance (double).
The class will have 2 constructors: The first constructor won’t let the user enter only the name of the account owner name (String). the constructor will allow the Application to pass 2 values: the Account owner name (String) and the Balance (double).
You need to develop a function Withdraw with the following: It won’t return anything and it will receive as a parameter the amount to withdraw from the balance. The function must check the balance if there not enough balance a message must be send (using the cout) and not withdraw should be performed, otherwise the function perform the withdraw.
You need to develop a function call Deposit with the following: It won’t return anything and it will receive as a parameter the amount to deposit to the balance. The function Deposit shouldn’t let the use deposit over 1,000 dollars. If the user try to deposit 1,000 dollars a message must be send and not deposit should be performed, otherwise the function perform the deposit and send a message using the cout.
Develop the function SetBalance to add balance when using the constructor with only name as parameter. GetName and GetBalance to retrieve name and Balance values from BankAccount class. Don’t forget both functions should return data (String for the name and double for the balance). These functions won’t receive any parameter.
Split your application in three files: the main application, the header, and the class.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:00, SuperWoman9172
What is one of the main problems that can occur when implementing a large number of new systems within an organization?
Answers: 1
image
Computers and Technology, 22.06.2019 07:30, haleyblu6351
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
image
Computers and Technology, 23.06.2019 09:00, paulusl19
The first screen you see when you open word2016 what is called?
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, cdavis379
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a. if the manual switch s is on, then the light l is on. b. besides the manual switch, there is a motion detector, m1, which activatesthis light. c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d. the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
You know the right answer?
This is an early object oriented C++ problem. Thanks Create an Application (BankApp) that perform t...

Questions in other subjects:

Konu
Mathematics, 18.10.2020 14:01