Design a class named Employee. The class should keep the following information in fields: Employee first name Employee last name Employee number in the format XXX-L, where each X is a digit within the range 0-9 and the L is a letter within the range A-M. Hire Date Write one or more constructors and the appropriate accessor and mutator methods for the class.

Respuesta :

Answer:

Explanation:

The following is written in Java and creates the Employee class with the variables requested and a getter setter method for each variable

package sample;

public class Employee {

   private String lastName, firstName, idNumber;

   

   public void Employee() {

   }

   public String getLastName() {

       return lastName;

   }

   public void setLastName(String lastName) {

       this.lastName = lastName;

   }

   public String getFirstName() {

       return firstName;

   }

   public void setFirstName(String firstName) {

       this.firstName = firstName;

   }

   public String getIdNumber() {

       return idNumber;

   }

   public void setIdNumber(String idNumber) {

       this.idNumber = idNumber;

   }

}