1.) Problem #1: Create a new Employee Class Build a new Employee class(Employee.java). This class will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1.) Problem #1: Create a new Employee Class Build a new Employee class("Employee.java"). This class will be a sub-class of Person. So it will inherit all the properties of Person(FirstName, LastName, Address and Email). Also add 2 new properties, an employee id number and a salary. Create this class, make sure to add 2 constructors(one that takes no args and 1 that takes all props from both the Person class and the Employee class) and a display() method that prints out all the props from both the Person class and the Employee class. Then use main to test out this class. Main Code → Employee e1; e1 = new Employee(2323, "Bill", "Clinton", "Marietta", "bc@msn.com", 43000.00); e1.display(); //prints all 6 properties 2.) Problem #2: Create a new Student Class Build a new Student class("Student.java"). This class will be a sub- class of Person. So it will inherit all the properties of Person (FirstName, LastName, Address and Email). Also add 3 new properties, a student id number, a major and a gpa. Create this class, make sure to add 2 constructors and a display() method. Then use main to test out this class. 1.) Problem #1: Create a new Employee Class Build a new Employee class("Employee.java"). This class will be a sub-class of Person. So it will inherit all the properties of Person(FirstName, LastName, Address and Email). Also add 2 new properties, an employee id number and a salary. Create this class, make sure to add 2 constructors(one that takes no args and 1 that takes all props from both the Person class and the Employee class) and a display() method that prints out all the props from both the Person class and the Employee class. Then use main to test out this class. Main Code → Employee e1; e1 = new Employee(2323, "Bill", "Clinton", "Marietta", "bc@msn.com", 43000.00); e1.display(); //prints all 6 properties 2.) Problem #2: Create a new Student Class Build a new Student class("Student.java"). This class will be a sub- class of Person. So it will inherit all the properties of Person (FirstName, LastName, Address and Email). Also add 3 new properties, a student id number, a major and a gpa. Create this class, make sure to add 2 constructors and a display() method. Then use main to test out this class.
Expert Answer:
Answer rating: 100% (QA)
Heres the implementation of the Employee class in Java java public class Employee extends Person pri... View the full 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
-
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...
-
123 Compare the purely graphical properties of these two notations, and the ways in which the graphical properties of each display correspond to the information structure being defined. Describe...
-
Write a python program that reads a string S containing integers and prints the maximum number of toys Robert has to buy for Charlie . . Input : 5 1 2 2 4 5 1 2 2 4 Output : 3 3
-
Describe the linkage between supply chain strategies and internal functional strategies and policies.
-
Describe the content available on the strategy club website at www.strategyclub.com.
-
Potassium atom 1 , with a mass of \(6.47 \times 10^{-26} \mathrm{~kg}\), has a speed of \(1.30 \times 10^{4} \mathrm{~m} / \mathrm{s}\). It collides with potassium atom 2 that is at rest, exciting...
-
Cain Company makes three products in its factory: plastic cups, plastic tablecloths, and plastic bottles. The expected overhead costs for the next fiscal year include the following. Factory managers...
-
The physician's office that you manage wants to buy equipment for $20,000 with projected cash flows of $3,000 per year over the equipment's ten-year useful life. Calculate the NPV/IRR at 10 percent....
-
As the project manager, you know it is important to get the project off to a good start. You are working with your project sponsor to decide on the optimal project management structure for this...
-
A machine element weighing 286 kg is supported by two springs, each having a stiffness k of 282 N/m (see the Figure below). A periodic force of maximum value 21 N is applied to the element with a...
-
Based on internet research, share an example of a company (not a government or organization) acting positively in the area of finance in the post-pandemic era. Discuss how this affects the community...
-
Please can you provide a success map in terms of performance measurement of HP's Inventory Driven Cost metric. In the 1990s, Hewlett-Packard's PC business was struggling to turn a dollar, despite the...
-
What is the profitability index for this proposed project if the required rate of return is 12%? Year Cash Flows 0 -1,000,000 1 200,000 2 400,000 3 300,000 4 700,000 a. 1.16 b. 1.13 c. 1.22 d. 1.25...
-
Given two pointers to the root nodes of two different, unbalanced, binary search trees (TreeNode * ptr), write a function "compare" to determine if the two trees contain the same values. You may...
-
Find the value of the remaining four trigonometric functions 1) sin=4/5, cos = -3/5 2) sin=-1/3, cos = 22/3
-
At the beginning of the year, Lam Ltd. had total assets of $800,000 and total liabilities of $500,000. Use this information to answer each of the following independent questions. (a) If Lam's total...
-
Bill and Guilda each own 50 percent of the stock of Radiata Corporation, an S corporation. Guilda's basis in her stock is $25,000. On July 31, 2012, Bill sells his stock, with a basis of $40,000, to...
-
Ulysses and Penelope are married and file separate returns for 2012. Penelope itemizes her deductions on her return. Ulysses' adjusted gross income was $17,400, his itemized deductions were $2,250,...
-
Fisafolia Corporation has gross income from operations of $220,000 and operating expenses of $160,000 for 2012. The corporation also has $20,000 in dividends from publicly traded domestic...
-
Once the Consumer Product Safety Commission prohibits the sale of a particular product in the United States, a manufacturer can no longer sell the product to U.S. wholesalers or retailers. However,...
-
Penalties for individuals who have violated the FCPA can run up to \(\$ 250,000\) per violation and five years' imprisonment. Corporate fines can be up to \(\$ 2\) million per violation. Also, under...
-
PricewaterhouseCoopers (or PwC, as it is known), one of the United States' "Big 4" accounting firms, has had a tax practice in Russia since the time that country changed from Communist rule. One of...
Study smarter with the SolutionInn App