Create a class called account that might use to represent customers’ bank accounts. Bank account should keep the record of customer’s account balance. Your class should provide a constructor that receives an initial balance and uses it to initialize data member. Account balance should be greater than or equal to zero. The class should provide the feature credit to insert any amount to customers’ account. Debit functionality should enable the user to withdraw the money from account (The function should keep the check of the amount withdraw should not exceed the current balance if it does generate an error message to the user indicating the operation is not possible). Function getBlanceenables the user to check the amount present in his account. solve it in C++.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Create a class called account that might use to represent customers’ bank accounts.
Bank account should keep the record of customer’s account balance. Your class should
provide a constructor that receives an initial balance and uses it to initialize data
member. Account balance should be greater than or equal to zero. The class should
provide the feature credit to insert any amount to customers’ account. Debit
functionality should enable the user to withdraw the money from account (The function
should keep the check of the amount withdraw should not exceed the current balance if
it does generate an error message to the user indicating the operation is not possible).
Function getBlanceenables the user to check the amount present in his account.
solve it in C++.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps