Question: USE C++ Q1 (a) Write a class time that has three data members hour, minutes and seconds. The class has the following member functions: A
USE C++
Q1 (a) Write a class time that has three data members hour, minutes and seconds. The class has the following member functions: A constructor to initialize the time Show function to show the time Overload ++ operator to increase the time by 1 minute. Overload operator to decrease the time by 1 minute. (b) Define a class for a bank account that includes the following data members: Name of the depositor Account Number Type of Account Balance Amount in the account The class also contains the following member functions: The constructor to assign initial values Deposit function to deposit some amount. It should accept the amount as parameter. Withdraw function to withdraw an amount after checking the balance. It should accept amount as parameter. Display function to display name and balance Overload binary + operator that adds the balance of one account to another account.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
