[SOLVED] 代写 Take Home Exercise Quiz 6 Question 1 – Due 11/18/2019 – Quiz6

30 $

File Name: 代写_Take_Home_Exercise_Quiz_6_Question_1_–_Due_11/18/2019_–_Quiz6.zip
File Size: 678.24 KB

SKU: 3184931672 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Take Home Exercise Quiz 6 Question 1 – Due 11/18/2019 – Quiz6
1- Write a struct or a class PersonType which will have firstName, lastName, eID (as an int), salary, and title
2- Write a struct or a class CompanyType that will have an cID, Name, City, State and Employee as an array of PersonType – let us limit our exercise to companies of size 1000 or less – and the number of employees as members.
3- Hide all variables for EmployeeType and CompanyType – except the array in CompamyType.
4- Write parameterized constructors for each struct/class – a person can be instantiated by all its attributes except salary and title. A company can be instantiated by ID, name and current number of employees (start with 0 at the time of instantiation).
5- Write appropriate getters and setters for each. To return a list of the employees of the company, you obviously can’t return an array. But if you use a vector you could. Ignore that particular getter – and I will do that part with you on Thursday.
6- Add a void method hire to CompanyType that takes as parameter a PersonType, salary, title. The method should add an employee to the array of employees of that company, and set the salary and title of that Person.
7- Add a method to Employee called giveRaise with a percentage.
8- In main() –
a. Make a data file that includes employees, and another one that includes companies, load them in, and Instantiate a the Companies and Persons – making sure that an employee works for an existing company in the company file – if an employee works for a company that does not exist in the company file, you need to add the company – your logic should be able to do this.
b. Declare a an array or a vector of CompanyType and add all companies to the array or vector.
c. Loop through companies and print each company followed by the employees working in the company.
d. Printtheavgsalarypercompany.
e. Printthetotalavgsalaryacrosscompanies.

f. Assume each company will give a raise that ranges between 3%-5%. Assign such a raise to each company randomly and then give its employees a raise, and redo parts d and e.
g. Sortallemployeesofallcompaniesbysalary
h. Sortallcompaniesbytheavgoftheirsalaries.
i. Write a method or methods to have an employee move
from one company to another.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 Take Home Exercise Quiz 6 Question 1 – Due 11/18/2019 – Quiz6
30 $