Answered step by step
Verified Expert Solution
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
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started