In a c++ program, assume a class called Account, which models a bank account, contains: two private data members accountNumber(int) and balance(double), which maintains the current account balance. Public functions credit() and debit(), which adds or subtracts the given amount from the balance, respectively . The debit() function shall print "amount withdraw exceeds the current balance!" if amount is more than balance. A public function print(), which shall print "A/C no:xxx Balance = xxx" (e.g A/C no: 53010005454 Balance= Tsh. 23000.72), with balance rounded to two decimal places. Workout the following : Using C++ programming language design an account class diagram write account.h file write account.cpp file write AccountTester.cpp file OBJECT ORIENTED PROGRAMMING IN C++
In a c++ program, assume a class called Account, which models a bank account, contains: two private data members accountNumber(int) and balance(double), which maintains the current account balance. Public functions credit() and debit(), which adds or subtracts the given amount from the balance, respectively . The debit() function shall print "amount withdraw exceeds the current balance!" if amount is more than balance. A public function print(), which shall print "A/C no:xxx Balance = xxx" (e.g A/C no: 53010005454 Balance= Tsh. 23000.72), with balance rounded to two decimal places.
Workout the following : Using C++
- design an account class diagram
- write account.h file
- write account.cpp file
- write AccountTester.cpp file
OBJECT ORIENTED PROGRAMMING IN C++
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 6 images