What is constructor? Define the class Account with all the basic attributes of a saving bank account. Define the default constructor, parameterised constructor in Account class. Define member functions display_balance(),for displaying the balance of account and cash_withdrawal( ) to withdraw some amount from account. Use appropriate access control specifiers in this program.
Answers
Answered by
6
Answer:
A constructor is a special method of a class or structure in object-oriented programming that initializes an object of that type. A constructor is an instance method that usually has the same name as the class, and can be used to set the values of the members of an object, either to default or to user-defined values.
Answered by
2
Answer:A constructor is a special method of a class or structure in object-oriented programming that initializes an object of that type. A constructor is an instance method that usually has the same name as the class, and can be used to set the values of the members of an object, either to default or to user-defined values.
Similar questions
World Languages,
6 months ago
Math,
6 months ago
Math,
1 year ago
Psychology,
1 year ago
English,
1 year ago
Physics,
1 year ago