A person registers in an e-commerce shopping-based application and adds an initial amount. The username, email, contact number, and balance of the person are generated. The person can deposit money later also as per need into the account, this will modify the existing amount balance through a function.
The person can buy items. The item(s) has its name and price. The person can enter the quantities of items. During purchasing items from the application, it should be checked if the billed amount is available in the account. The person can also close the account, the available amount will be paid out.
Write a programme to demonstrate the above situation for a user with the use of Constructor and Destructor and Inheritance.
Comments
Leave a comment