Write a complete Java program to do the following. program to do the following.... Create superclass UTAPerson
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
program to do the following.... Create superclass UTAPerson with String name and String ID. This class has an instance method Who Am I () that prints "I am xxxxx" where xxxxx is the name of the class. Using UTAPerson, create subclass Student and subclass Employee. In main (), instantiate a Student object and an Employee object and store them in the same ArrayList. Loop over the ArrayList and call Who Am I () for each element. The output should be I am Student I am Employee Use these lines of code to form your answer. Add {} as needed and format as needed to follow the code formatting standard of this class. Use Preformatted font or lose 5 points. public class Student implements UTAPerson super (name); ABC.add(Student ("Student")); name className; private void WhoAmI ( ) super(); public UTAPerson (String className) ArrayList<Employee> ABC = new ArrayList<>(); Employee. WhoAmI ( ) ; public Student (String name) public UTAPerson (string className) program to do the following.... Create superclass UTAPerson with String name and String ID. This class has an instance method Who Am I () that prints "I am xxxxx" where xxxxx is the name of the class. Using UTAPerson, create subclass Student and subclass Employee. In main (), instantiate a Student object and an Employee object and store them in the same ArrayList. Loop over the ArrayList and call Who Am I () for each element. The output should be I am Student I am Employee Use these lines of code to form your answer. Add {} as needed and format as needed to follow the code formatting standard of this class. Use Preformatted font or lose 5 points. public class Student implements UTAPerson super (name); ABC.add(Student ("Student")); name className; private void WhoAmI ( ) super(); public UTAPerson (String className) ArrayList<Employee> ABC = new ArrayList<>(); Employee. WhoAmI ( ) ; public Student (String name) public UTAPerson (string className)
Expert Answer:
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In this assignment, you will create a program that allows theuser to draw in a window using brushes of different sizes andcolors. The user will be able to change the size and color of thebrush using...
-
The code that you add to the Craps main method needs to do the following steps in the following order (where indicated by the comments in the code itself): 1. Declare an integer array named counts...
-
What has been the trend in sales over the years presented? July 29, July 30, 2023 2022 (Unaudited) (Unaudited) Net sales $ 5,164,072 100.0% $ 4,643,014 100.0% Cost of sales 3,115,603 60.3% 2,773,824...
-
Wendy is evaluating a capital budgeting project that should last for 4 years. The project requires $800,000 of equipment. She is unsure what depreciation method to use in her analysis, straight-line...
-
Think of ticket scalpers at a rock concert, a baseball game, and an opera. Might they exist because the tickets to these events were originally sold for less than the equilibrium price? Why or why...
-
The electric catfish is another electric fish that produces a voltage pulse by means of stacks of electrocytes. As the fish grows in length, the magnitude of the voltage pulse the fish produces grows...
-
Trinh Co. sold $3,000,000, 8%, 10-year bonds on January 1, 2012. The bonds were dated January 1, 2012, and pay interest on January 1. The company uses straightline amortization on bond premiums and...
-
In initial public offerings (IPOs) relatively few firms pay cash dividends. Why do you suppose that is? Explain.
-
Forecasting the Pan-Pacific Pyramid: Australia, Japan & The United States What are the current spot exchange rate for the following cross rates? a. Japaness Yen/Us dollar exchange rate b. Japanese...
-
Consider a classifier trained on the 60k MNIST images (no augmentation). We test it on images where the pixels have been shifted. We expect the test accuracy to be poor. Is this an example of...
-
provide the comments in each line of the code let courses = [ { code: "APC100", name: "Applied professional communication", hours: 3, url: "http:/www.senecacollege.ca" }, { code:...
-
For the group application work, build a Regnier Abacus with around 6 questions, aimed at prospecting information about the attributes of the product. Add a comment about the difficulties you may have...
-
Illustration of copy constructor Todo: + finish the copy constructor so the new object has the same shot records as the one it copies from. + add code to the main method to copy more Pet objects,...
-
Click on Settings in the Fixed Assets screen to add the following asset types: Asset Type: Building Improvements Asset Account: 720/001 - Buildings Accumulated Depreciation Account: 720/002 - Less...
-
Taking into account the previous exercise, create also the Bookcase class (understood as a bookcase inside a bookstore). Each bookcase must be dedicated to a certain literary genre included in the...
-
You are a salesperson for a local home insurance provider. In preparation for an upcoming sales presentation, you requested that a prospect send you details on their current home insurance coverage....
-
Quadrilateral EFGH is a kite. Find mG. E H <105 G 50 F
-
Write a program that determines the change to be dispensed from a vending machine. An item in the machine can cost between 25 cents and a dollar, in 5 cent increments (25, 30, 35, , 90, 95, or 100),...
-
Create a class Rational that represents a rational number. It should have private attributes for The numerator (an integer) The denominator (an integer) and the following methods: Rational(numerator,...
-
Overload the method selectionSort in Listing 7.10 so that it sorts an array whose indices range from first to last, where 0 first last, and last is less than the length of the array. Listing 7.10...
-
An object traveling at a constant velocity vo experiences a constant acceleration in the same direction for a period of time t. Then an acceleration of equal magnitude is experienced in the opposite...
-
Can the displacement of a persons trip be zero, yet the distance involved in the trip is nonzero? How about the reverse situation? Explain.
-
You are told that a person has walked 750 m. What can you safely say about the persons final position relative to the starting point?
Study smarter with the SolutionInn App