Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image

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.

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Heres the implementation of the Employee class in Java java public class Employee extends Person pri... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

1.2 Define culture and explain the origins of human cultures.

Answered: 1 week ago