Write a complete C++ program that is able to do the following tasks: 1. Write a class definition based on the class diagram above. Declare the data members as private, while the member functions as public. 2. Define the constructor for class account by one of the following method: i. Overload constructors - Define the first constructor without parameter and the second constructor with parameter. Both constructor will initialize the data members with suitable values. ii. Constructor with default argumen - initialize the data members with suitable values. 3. Write implementation function for the following member function: i. gethalance ( )- return the the account balance. ii. withdraw (float ) - allow user to withdraw some money. Check whether the balance in the account is sufficient to be withdrawn. deposit (float) - llow user to deposit some money and update the iii. balance in the account. iv. printDetail ()-print all the information in the account. transfer (Account, float amount) - transfer money with the amount specified to another Account. v. 4. Write main () program that will declare 2 instances of object account. Declare the instances based on the parameters provided in the constructor. 5. Implement all member functions to show the transactions of the accounts using: getBalance( ). withdraw( ). deposit ( ). printDetail () and transfer () which are accessed through the objects. 6. Declare an array of account with size 10. Read information about the account from a data file. 7. Implement the member functions through the Account array elements.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Must Answer all questions else will give u downvote
LAB 8: ACCOUNT
Account
accountName : string
accountNumber : string
accountType: int
accountBalance: float
getBalance 0 float
withdraw (float) : void
deposit (float) : void
printDetai1() void
transfer (Account, float) : void
Write a complete C++ program that is able to do the following tasks:
1. Write a class definition based on the class diagram above. Declare the data
members as private, while the member functions as public.
2. Define the constructor for class account by one of the following method:
i. Overload constructors - Define the first constructor without parameter and
the second constructor with parameter. Both constructor will initialize the
data members with suitable values.
ii. Constructor with default argumen - initialize the data members with
suitable values.
3. Write implementation function for the following member function:
getBalance ( )-return the the account balance.
i.
ii.
withdraw (float ) - allow user to withdraw some money. Check
whether the balance in the account is sufficient to be withdrawn.
iii.
deposit(float) - allow user to deposit some money and update the
bulance in the account.
iv. printDetail () - print all the information in the account.
transfer (Account, float amount) - transfer money with the
amount specified to another Account.
V.
4. Write main () program that will declare 2 instances of object account. Declare
the instances based on the parameters provided in the constructor.
5. Implement all member functions to show the transactions of the accounts
using: getBalance ( ). withdraw ( ), deposit ( ).
printDetail () and transfer () which are accessed through the objects.
6. Declare an array of account with size 10. Read information about the account
from a data file.
7. Implement the member functions through the Account array elements.
Transcribed Image Text:LAB 8: ACCOUNT Account accountName : string accountNumber : string accountType: int accountBalance: float getBalance 0 float withdraw (float) : void deposit (float) : void printDetai1() void transfer (Account, float) : void Write a complete C++ program that is able to do the following tasks: 1. Write a class definition based on the class diagram above. Declare the data members as private, while the member functions as public. 2. Define the constructor for class account by one of the following method: i. Overload constructors - Define the first constructor without parameter and the second constructor with parameter. Both constructor will initialize the data members with suitable values. ii. Constructor with default argumen - initialize the data members with suitable values. 3. Write implementation function for the following member function: getBalance ( )-return the the account balance. i. ii. withdraw (float ) - allow user to withdraw some money. Check whether the balance in the account is sufficient to be withdrawn. iii. deposit(float) - allow user to deposit some money and update the bulance in the account. iv. printDetail () - print all the information in the account. transfer (Account, float amount) - transfer money with the amount specified to another Account. V. 4. Write main () program that will declare 2 instances of object account. Declare the instances based on the parameters provided in the constructor. 5. Implement all member functions to show the transactions of the accounts using: getBalance ( ). withdraw ( ), deposit ( ). printDetail () and transfer () which are accessed through the objects. 6. Declare an array of account with size 10. Read information about the account from a data file. 7. Implement the member functions through the Account array elements.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY