Implement the classes in the UML diagram: Student String status -String name Person -String phone number...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Implement the classes in the UML diagram: Student String status -String name Person -String phone number Person(String name, String phone_number) String getName() String getPhone_number() Employee -double salary Student(String name, String phone_number, String status) + String getStatus() +String toString() +Employee(String name, String phone_number, double salary) +double getSalary)) Faculty -boolean advisor -String title Staff -String rank +Faculty(String name, String phone_number, double salary, boolean advisor, String rank) +boolean isAdvisor +String getRank) +Staff(String name, String phone_number, double salary, String title) + String getTitle() +String toString() +String toString() In a loop, use the split method to extract the words separated by commas. If the first string is "Student", (respectively Faculty or Staff) create a Student object and use the subsequent words to initialize this object with the name, phone number and status. 2- Having constructed the array of Persons (You can write the code of this part even if you did not manage to fill the array in part 1, write the loops that answer the following queries: a. Print the list of staff b. Print the list of advisors c. Find the employee with the highest salary. d. Count the number of senior students Program Output: The list of staff: Staff (Deann Borrego} Staff (Griselda Longway} The list of advisors: Faculty (Tianna Guinan} Faculty (Lavonna Gorelick} The employee with the maximal salary is Faculty (Lavonna Gorelick} The number of senior students is: 1 Implement the classes in the UML diagram: Student String status -String name Person -String phone number Person(String name, String phone_number) String getName() String getPhone_number() Employee -double salary Student(String name, String phone_number, String status) + String getStatus() +String toString() +Employee(String name, String phone_number, double salary) +double getSalary)) Faculty -boolean advisor -String title Staff -String rank +Faculty(String name, String phone_number, double salary, boolean advisor, String rank) +boolean isAdvisor +String getRank) +Staff(String name, String phone_number, double salary, String title) + String getTitle() +String toString() +String toString() In a loop, use the split method to extract the words separated by commas. If the first string is "Student", (respectively Faculty or Staff) create a Student object and use the subsequent words to initialize this object with the name, phone number and status. 2- Having constructed the array of Persons (You can write the code of this part even if you did not manage to fill the array in part 1, write the loops that answer the following queries: a. Print the list of staff b. Print the list of advisors c. Find the employee with the highest salary. d. Count the number of senior students Program Output: The list of staff: Staff (Deann Borrego} Staff (Griselda Longway} The list of advisors: Faculty (Tianna Guinan} Faculty (Lavonna Gorelick} The employee with the maximal salary is Faculty (Lavonna Gorelick} The number of senior students is: 1
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A person has a name, address, phone number, and email address. A student...
-
At December 31, 2010, Cafu Co. reported the following information on its statement on financial position. Accounts receivable...............R$960,000 Less: Allowance for doubtful accounts............
-
The concept of ''one-stop-shopping'' for global logistics is fast catching on. There are now more than thirty large logistic companies, called ''mega-carriers,'' who can provide truly global and...
-
A binary search function is searching for a value that happens to be stored in the middle element of an array. How many times will the function read an element in the array before finding the value?
-
Elaine Chan is a newly appointed director of Elite Sports Ltd, a listed company that organises major sporting events. Elaine has provided consultancy services to Elite Sports Ltd for the past 3...
-
At December 31, 2014, the trial balance of Sloane Company contained the following amounts before adjustment. Instructions (a) Prepare the adjusting entry at December 31, 2014, to record bad debt...
-
19. Find the tension T for the system shown in figure :- T T T 1 kg 2 kg 3 kg (1) IgN (2) 2 gN (3) 5 gN (4) 6 gN 20. A ball of mass 0.5 kg moving with a velocity of 2 m/sec strikes a wall normally...
-
How often do you plan to do a physical count of inventory on hand? What will the physical count accomplish?
-
What features of common stock indicate ownership in the corporation versus preferred stock or bonds?
-
Why is it difficult to measure future cash flows?
-
How is a cash budget used in financial planning?
-
What provisions are available to protect a preferred stockholder?
-
Assuming the market is efficient, what is the relationship between a stocks price and the security market line?
-
7% coupon for $1,080.50 matures in six years. Sale bond today, return on bond is 5.5%, inflation rate 3.2 % past year. What is the total real rate on return investment?
-
If there is an unrealized holding gain on available-for-sale investments, it is reported as?
-
Based on Exhibit 1, the fi nancial leverage ratio for Company B is closest to: A . 0.55. B . 1.22. C . 2.22. EXHIBIT 1 Common-Size Balance Sheets for Company A, Company B, and Sector Average Company...
-
Under which section of a manufacturing companys cash fl ow statement are the following activities reported? Item 1: Purchases of securities held for trading Item 2: Sales of securities considered...
-
Based on Exhibit 1, which ratio indicates lower liquidity risk for Company A compared with Company B? A . Cash ratio. B . Quick ratio. C . Current ratio. EXHIBIT 1 Common-Size Balance Sheets for...
Study smarter with the SolutionInn App