Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mail - Jitwan Singh - Outlook x Content X + X C O learn.senecacollege.ca/ultra/courses/_670736_1/cl/outline?legacyUrl=~2Fwebapps~2Fblackboard~2Fcontent~2FlaunchAssessment.jsp%3Fcourse_id%3D_670736_1%26content_id%3D_14363... S DCF Midterm - goo... Infographic TOUP Learning Resources Remaining Time:

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Mail - Jitwan Singh - Outlook x Content X + X C O learn.senecacollege.ca/ultra/courses/_670736_1/cl/outline?legacyUrl=~2Fwebapps~2Fblackboard~2Fcontent~2FlaunchAssessment.jsp%3Fcourse_id%3D_670736_1%26content_id%3D_14363... S DCF Midterm - goo... Infographic TOUP Learning Resources Remaining Time: 1 hour, 12 minutes, 10 seconds. X Course Outline Faculty Information Question Completion Status: Documents 1 Tools 18 Quizzes Midterm Tests QUESTION 1 30 points Save Answer Final Tests Q3. You are required to design a system for assigning different projects to different employees of a company. Each project has a title, cost, and duration in months. Help/Office Consider the following class definition of Project: class Project Project::Project(string t,int d1) protected: Ititle=t; string title; duration=d1; float cost; cost=0;} int duration; X float Project::calc_cost() public: {cost=1000*duration; Project(string="",int=0); return cost; float calc_cost(); Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers Save and Submit Assignment-2-akjfsw.zip DBS311_Assignm...docx Show all X -1'C ENG 15:44 Cloudy W IN 09-12-2022Mail - Jitwan Singh - Outlook x Content X + X > C learn.senecacollege.ca/ultra/courses/_670736_1/cl/outline?legacyUrl=~2Fwebapps~2Fblackboard~2Fcontent~2FlaunchAssessment.jsp%3Fcourse_id%3D_670736_1%26content_id%3D_14363... S DCF Midterm - goo.. Infographic X Remaining Time: 1 hour, 12 minutes, 02 seconds. Question Completion Status: 1 There are two types of projects in a company: Team Project and individual project. We need to store total number of employees working on Team Project. For an individual project, no extra information is required. Cost of Team project is calculated by using formula: cost = No. of employees x duration*1000 + 10,000. Cost of Individual Project is cost = duration*1000 + 10,000. Use C++ Inheritance concept and write implementation of team project and individual project. Write constructor for both classes and function float calc_cost() for both classes. This function should calculate cost and return its value. Use the space given on next page to write your code. Now consider following class definition of an Employee. This class stores id, salary and type of an employee. An employee can be commissioned employee or a part-time employee. For EFFE a commissioned employee, we set the type to 'c' and for part-time employee we set the type to 'p'. Every employee works on a project. Commissioned employee can work on Team Project only and part-time employee works only on an individual project. . Implement AssignProject function for this class. This function should assign a new Team or individual project to an employee based on type of employee. For any type of project, ask user to enter required details. . Also write a function to calculate Salary of an employee. Employee is paid on basis of the project he/she is working on. Employee's salary is 20 percent of the cost of the project. This function should return the calculated salary. You are not allowed to implement any other member function. class Employee{ Sample Main private: int main() X lint ID; (Employee E1(1,'c'); Project *p; E1.AssignProject(); float salary; cout C A learn.senecacollege.ca/ultra/courses/_670736_1/cl/outline?legacyUrl=~2Fwebapps~2Fblackboard~2Fcontent~2FlaunchAssessment.jsp%3Fcourse_id%3D_670736_1%26content_id%3D_14363... S DCF Midterm - goo.. Infographic X Remaining Time: 1 hour, 11 minutes, 58 seconds. Question Completion Status: 1 You are not allowed to implement any other member function. class Employee{ Sample Main private: nt main() EFFE int ID; (Employee E1(1,'c'); Project *p; E1.AssignProject(); float salary; cout C A learn.senecacollege.ca/ultra/courses/_670736_1/cl/outline?legacyUrl=~2Fwebapps~2Fblackboard~2Fcontent~2FlaunchAssessment.jsp%3Fcourse_id%3D_670736_1%26content_id%3D_14363... S DCF Midterm - goo.. Infographic X Remaining Time: 1 hour, 11 minutes, 53 seconds. Question Completion Status: 1 Implement these: Class TeamProject [5 marks] Class IndividualProject [5 marks] EFFE Constructor of Class TeamProject [3 Marks] Constructor of Class IndividualProject [2 Marks] Calc_cost() for class TeamProject [2.5 Marks] Calc_cost() for Class IndividualProject [2.5 Marks] Calc_Salary() for class Employee: [4Marks] void Employee::AssignProject() [6 marks] X For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Paragraph Arial V 10pt AV AV IX . .. E E X2 X2 SIT The - + ABC V Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers Save and Submit Assignment-2-akjfsw.zip DBS311_Assignm..docx Show all X -1'C 15:44 Cloudy W ENG IN 09-12-2022

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

Students also viewed these Programming questions