generate functionTue, 24 Jan 2023

constructor of the class will be all the data except the employee number, which will be a generated number (the first employee to be employee number 1, the second employee number 2 and so on). and so on)

public Employee(String name, double salary, int month, int day, int year) { = name; this.salary = salary; GregorianCalendar calender = new GregorianCalendar(year, month - 1, day); hireDay = calender.getTime(); }

Questions about programming?Chat with your personal AI assistant