Solution Lab Mini Project Java
Solution Lab Mini Project Java
Solution Lab Mini Project Java
code
class Main {
public static void main(String[] args) {
SalariedEmployee salariedEmployee = new SalariedEmployee(new Name("John", 'D', "Doe"), new
Date(5, 9, 2020), 50000.0);
HourlyEmployee hourlyEmployee = new HourlyEmployee(new Name("Jane", 'M', "Smith"), new
Date(3, 15, 2019), 20.0, 40.0);
class Name {
private String first;
private char initial;
private String last;
class Date {
private int month;
private int day;
private int year;
class Employee {
protected Name empName;
protected Date hireDate;
Output