Implement a base class appointment and derived classes


Derive a class Programmer from Employee. Supply a constructor Programmer

Exercise 1: Derive a class Programmer from Employee. Supply a constructor Programmer (string name, double salary) that calls the base-class constructor.

Supply a function get_name that returns the name in the format "Hacker, Harry (Programmer)".

Exercise 2: Implement a base class Account and derived classes Savings and Checking. In the base class, supply member functions deposit and withdraw. Provide a function daily_interest that computes and adds the daily interest. For calculations, assume that every month has 30 days. Checking accounts yield interest of 3 percent monthly on balances over $1,000. Savings accounts yield interest of 6 percent on the entire balance. Write a driver program that makes a month's worth of deposits and withdrawals and calculates the interest every day.

Exercise 3: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, "see the dentist") and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

Exercise 4: Improve the appointment book program of Exercise 3. Give the user the option to add new appointments. The user must specify the type of the appointment, the description, and the date and time.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Implement a base class appointment and derived classes
Reference No:- TGS01710442

Now Priced at $55 (50% Discount)

Recommended (90%)

Rated (4.3/5)