What would be the following output using Java? Activity 1. Implement the hierarchy of classes shown in
Fantastic news! We've Found the answer you've been seeking!
Question:
What would be the following output using Java?
Transcribed Image Text:
Activity 1. Implement the hierarchy of classes shown in the UML diagram below: Person -id: int Employee -position: String -salary: double +Employee() +Employee (String name, String address, String phone, String email, int id, String position, double salary) +getID(): int +getPosition(): String +getSalary(): double +setID (int id): void +setPosition(String p): void +setSalary (double s): void +toString(): String #name: String #address: String #phone: String #email: String +Person() +Person(String name, String address, String phone, String email) +getName(): String +getAddress(): String +getPhone(): String +getEmail(): String +setName(String n): void +setAddress (String a): void +setPhone(String p): void +setEmail (String e): void +toString(): String Student -rank: String +Faculty() Faculty +Faculty (String name, String address, String phone, String email, int id, String position, double salary, String rank) +getRank(): String +setRank(String rank): void +toString(): String -id: int -major: String +Student() +Student (String name, String address, String phone, String email, int id, String major) +getID(): int +getMajor(): String +setID (int id): void +setMajor(String m): void +toString(): String 2. Create a main class named Test. In the main method, create an array named people of type Person and size 4. Create four objects of type Person, Student, Employee, and Activity 1. Implement the hierarchy of classes shown in the UML diagram below: Person -id: int Employee -position: String -salary: double +Employee() +Employee (String name, String address, String phone, String email, int id, String position, double salary) +getID(): int +getPosition(): String +getSalary(): double +setID (int id): void +setPosition(String p): void +setSalary (double s): void +toString(): String #name: String #address: String #phone: String #email: String +Person() +Person(String name, String address, String phone, String email) +getName(): String +getAddress(): String +getPhone(): String +getEmail(): String +setName(String n): void +setAddress (String a): void +setPhone(String p): void +setEmail (String e): void +toString(): String Student -rank: String +Faculty() Faculty +Faculty (String name, String address, String phone, String email, int id, String position, double salary, String rank) +getRank(): String +setRank(String rank): void +toString(): String -id: int -major: String +Student() +Student (String name, String address, String phone, String email, int id, String major) +getID(): int +getMajor(): String +setID (int id): void +setMajor(String m): void +toString(): String 2. Create a main class named Test. In the main method, create an array named people of type Person and size 4. Create four objects of type Person, Student, Employee, and
Expert Answer:
Answer rating: 100% (QA)
Based on the provided information and the given UML diagram heres the implementation of the classes class Person String name String address String pho... View the full answer
Related Book For
Macroeconomics
ISBN: 978-1319120054
3rd Canadian edition
Authors: Paul Krugman, Robin Wells, Iris Au, Jack Parkinson
Posted Date:
Students also viewed these programming questions
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
Describe, in detail, how the heapsort algorithm works. [10 marks] Show that the worst-case cost of heapsort is O(n log n). [6 marks] Would it be possible to implement a variant of heapsort based on a...
-
Kyrsten Haas expects an S corporation investment to generate a profit of $200,000. Her share of the S corporation is 15%. What is Kyrstens income tax if no cash is distributed? Kyrsten's marginal tax...
-
Consider the following data for November 2017 from MacLean Manufacturing Company, which makes silk pennants and uses a process-costing system. All direct materials are added at the beginning of the...
-
What is a tax? How does a tax differ from a fine?
-
Identify the most appropriate approach and then design. Provide a rationale as to why this approach and design would be most appropriate. Develop a hypothetical research scenario that would...
-
Ludwick Steel Company as lessee signed a lease agreement for equipment for 5 years, beginning December 31, 2010. Annual rental payments of $40,000 are to be made at the beginning of each lease year...
-
A seal dives below the ice in search of fish. Its path can be modelled by where d is the depth in decameters and t the time in minutes. Use the equation above to answer questions about the seal's...
-
Consider a building with 3200 ft 2 of walls. Assume the ceiling is well-insulated and compute the energy loss through the walls based on the following materials, assuming an indoor temperature of 70...
-
Locate a business periodical such as Fortune or Forbes or a business newspaper such as The Wall Street Journal. Find three examples of the use of a graph to display data. For each graph a. Give the...
-
Write html form code to display following output : What type of bike do you want to purchase? Street bike C Mountain bike C dirt bike Camel water bag What accessories do you need? Gloves L Helmet...
-
Bob Costas has developed a reputation as one of the best sports interviewers. Access one of his sports interviews, either online or on television, or choose another sports interviewer. Analyze the...
-
I need answer for this question in a simple form for class discussion activity. Discussion #4 - International MARCOM fails and Why? Available on Nov 14, 2022 12:01 AM. Submission restricted before...
-
John is evaluating a stock that he believes will pay a dividend equal to $2.75 in exactly one year from today. Further, John expects that in addition to the dividend he will be able to sell the stock...
-
Describe almond and cashew being introduced to your switzerland country. Using the product component model as your guide, indicate how your product can, or needs to be, adapted for the market....
-
The concentric loops of radii (r) and (2r) each carries the same current (I) when a current of intensity 12A passing through a long wire, as shown in the figure, the total magnetic flux density at...
-
This problem continues the Draper Consulting, Inc., situation from Problem 12-45 of Chapter 12. In October, Draper has the following transactions related to its common shares: Oct 1 Draper...
-
Part of the information collected in the Labour Force Survey concerns how long individuals have been unemployed. Go to www.statcan.gc.ca to find the latest report. Click on the link on this main page...
-
Assuming that the aggregate price level is constant, the interest rate is fixed, and there are no taxes and no foreign trade, what will be the change in GDP if the following events occur? a. There is...
-
An economy is in long-run macroeconomic equilibrium with an unemployment rate of 5% when the government passes a law requiring the central bank to use monetary policy to lower the unemployment rate...
-
Cruz Manufacturing Ltds sales slumped badly in 2019. For the first time in its history, it operated at a loss. The companys income statement showed the following results from selling 600 000 units of...
-
The following are emails from various students to Dr. Destiny Sands, who is a professor in the English Department. These students are wondering if Dr. Sands would let them register for her...
-
What are some flawed assumptions about workplace communication? What is the reality for each myth?
Study smarter with the SolutionInn App