C++ homework

C++ homework 

Exercise P8.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 P8.2. Implement a base class Person. Derive classes Student and Instructor from Person. A person has a name and a birthday. A student has a major, and an instructor has a salary. Write the class definitions, the constructors, and the member functions print() for all classes.

Exercise P8.3. Derive a class Manager from Employee. Add a data field, named department, of type string. Supply a function print that prints the manager’s name, department, and salary. Derive a class Executive from Manager. Supply a function print that prints the string Executive, followed by the information stored in the Manager base object.

Exercise P8.4. 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 calcula- tions, 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 per- cent 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 P8.5. Measure the speed difference between a statically bound call and a dynamically bound call. Use the Time class to measure the time spent in one loop of virtual function calls and another loop of regular function calls.

Exercise P8.6. Write a base class Worker and derived classes HourlyWorker and SalariedWorker. Every worker has a name and a salary rate. Write a virtual function compute_pay(int hours) that computes the weekly pay for every worker. An hourly worker gets paid the hourly wage for the actual number of hours worked, if hours is at most 40. If the hourly worker worked more than 40 hours, the excess is paid at time and a half. The salaried worker gets paid the hourly wage for 40 hours, no mat- ter what the actual number of hours is.

Exercise P8.7. Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the den- tist”) 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 P8.8. Improve the appointment book program of Exercise P8.7. 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.

Get Cheap Assignment Writing Service from StudyAcer

StudyAcer
Calculate your paper price
Pages (550 words)
Approximate price: -
StudyAcer

Quality Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

StudyAcer

Qualified Writers

We have hired a team of professional writers experienced in academic and business writing. Most of them are native speakers and PhD holders able to take care of any assignment you need help with.

StudyAcer

Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account.

StudyAcer

Prompt Delivery

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. We will always strive to deliver on time.

StudyAcer

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text.

StudyAcer

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

StudyAcer

Place your order

Fill in the order form and provide all details of your assignment.

StudyAcer

Proceed with the payment

Choose the payment system that suits you most.

StudyAcer

Receive the final file

Once your paper is ready, we will email it to you.

Academic Writing Services

If you are looking for exceptional academic writing services, then you are in the right place. Studyacer offers customised academic assignments and academic papers for students at all levels.

StudyAcer StudyAcer

Essays

Essay Writing Help

Writing an essay can be a challenge. However, we know what every student needs. And we purpose to deliver. Here at StudyAcer, we do all we can to help with academic essays and assignments. We have a dedicated team of professional essay writers.

StudyAcer StudyAcer

Assignment

Assignment Help

We understand students need satisfactory results. Our cheap assignment writing service helps and never leaves any doubt. We always strive to ensure the ultimate and best results. It is our joy to offer a cheap reliable essay writing service.

StudyAcer StudyAcer

Term paper

Term Paper Help

Have you been asking yourself, where can get a pre written research papers for sale? Worry no more, the fact that you have a term paper that is due tonight and you haven’t touched it. At Study Acer it is our responsibility to get your paper on time.

StudyAcer StudyAcer

Dissertation

Dissertation Writing Service

Several master’s students seek professional help with their thesis.Students from different parts of the world experience different challenges. Dissertations have different stages and the challenges are different too. Do not struggle in silence, order now .