labexamBSolution.docx - CSC 111(Lab Final Exam Solution(B Name ID http/6alebtec.com/index.php/topic/1007نموذجلاختبارالفاينل Question

# labexamBSolution.docx - CSC 111(Lab Final Exam Solution(B...

• 4

This preview shows page 1 - 2 out of 4 pages.

CSC 111 (Lab Final Exam Solution ) (B) Name: ID: - %D9%86%D9%85%D9%88%D8%B0%D8%AC- %D9%84%D8%A7%D8%AE%D8%AA%D8%A8%D8%A7%D8%B1- %D8%A7%D9%84%D9%81%D8%A7%D9%8A%D9%86%D9%84/ Question 1 : Having a class Company (as shown in the UML diagram below). we would like to manage the Company Employees. (6 marks) Company - employeeName[] : String - employeeSalary[]: double - currentNumberOfEmployees: int + Company(size:int) + addEmployee(name:String , salary:int) : void + calculateTheSumofTheSalaries() : double + nameOfTheEmployeeWithMostSalary() : String Do the following :- 1- Implement the class Company . 2- Implement the class CompanyTest which contains the main. the main should creates a Company of size 10. then reads 5 Employees info (name and Salary) from the user and add them to the Company. Then test all methods you implemented in the class Company. Example of execution:- Enter the name of Employee 1: Nasser Enter the salary of Employee 1: 15000 Enter the name of Employee 2: Ali Enter the salary of Employee 2: 10000 ...

Subscribe to view the full document.

• Fall '10
• ZuhairShentuf
• Salary, Summation, The Elements

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes