Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ In the following program an employee of a company is represented by an object of type employee consisting of a name, employee id, employee

C++ In the following program an employee of a company is represented by an object of type employee consisting of a name, employee id, employee salary and the workday starting time. The starting time is a class time24 object.

Implement the class employee. (Boxed in red) The rest of the code is already provided

For marking purposes your output should look like:

image text in transcribed

THIS IS THE CODE: image text in transcribed

image text in transcribed

xSmith, 124, 50000, 08:30} Declaration of Employee and Time Classes File employeetime.h Illustrates composition of classes #ifn d e f EMPLOYETIME.H #define EMPLOYEEME.H #include #include using namespace std; class time24 f private: int hour; int minute; hour between 0 and 23 /minute between 0 and 59 public time24 (int h, int m); void write (ostream & out) const // prints hour minute to out constructor class employee [ private: last name string name int id; float salary; // employee salary time24 start; // workday start time /employee id number public: employee (string n, int i, float s, int h, int m); void write (ostream & out) const; ndif /* EMPLOYEETIME.H */ Implementation of Employee and Time Classes File employeetime. cpp Implementation of classes employee and time * #include "employeetime.h" TRIITTTHITTT//T Implementation of time24 /IITTTVVITTTVRRRITVIRTTTI1 time24:: time24 (int h, int m) hour - h; minute-m; void time24:: write (ostream &out) const out

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions