C++ Employees With Three Different Positions Work At a Restaurant

C++ Employees With Three Different Positions Work At a Restaurant

Objectives

This assignment aims at understanding class hierarchies, multiple inheritance and thereason of ambiguous inheritance, polymorphism, the principles behind virtual functionsand polymorphism applications.

The objectives are

  • to understand class hierarchy and inheritance
  • to be able to identify ambiguous inheritance in multiple inheritance
  • to be able to define virtual base classes
  • to know differences between static and dynamic polymorphism
  • to be able to define virtual functions and abstract base classes

ProblemThe

employees with three different positions work at a restaurant, i.e, waiter, singer, singer-waiter. The waiter, singer and singer-waiter all have the properties of name and ageand the operations of the property print and the income calculation. These employees arefurther described as follows:
(1) The waiter is a full-time employee. His monthly salary includes basic salary and his bonus per month;
(2) The singer is a part-time employee. He earns an hourly wage (e.g. 200 yuan per hour)His wage is calculated according to his weekly work hours.
(3) The singer-waiter is a full-time employee. He is not only a waiter but also a singer. Heworks as a singer one day per week. His monthly salary includes basic salary, his bonus pelmonth and hourly wage as the singer.

Assignment’s Requirement

1.Analyze and draw the UML diagram of class hierarchy.
2. Define all classes that includes the constructors with parameters.
3.Write a test program.

What should be submitted?

A short report (up to a few pages of texts plus C++ source codes) detailing for the problemof the assignment, and a short video (<4 mins) with presenting your code and running result.
The report includes the following contexts.

  1. Problem statement. Write the title, objectives and problem description.
  2. Analysis and design. Describe the properties of the class by using the UML diagram
  3. mplementation: your C++ source code including the comments.
  4. Test: explain how you test and verify your C++ program.
  5. Result. Test result must be shown by screenshotThe report is submitted in the PDF format (studentNotassignmentNo.PDF file). The reportand video are submitted to the Chaoxing.website.

源码传送门

传送门:https://pan.baidu.com/s/1JJs9vbZahUCB6cQvXLgAVg?pwd=1111

你可能感兴趣的:(c++,数据结构,算法,信息管理系统,虚拟继承)