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 class Employee { private String name; private String jobTitle; private int age; private String phoneNumber; private String email; private String address; private String startDate; private String salary; public Employee(String name, String jobTitle, int age, String phoneNumber, String email, String address, String startDate, String salary) { = name; this.jobTitle = jobTitle; this.age = age; this.phoneNumber = phoneNumber; = email; this.address = address; this.startDate = startDate; this.salary = salary; } }

Questions about programming?Chat with your personal AI assistant