Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. public class Employee {
  2.    private int id;
  3.    private String firstName;
  4.    private String lastName;  
  5.    private int salary;  
  6.  
  7.    public Employee() {}
  8.    public Employee(String fname, String lname, int salary) {
  9.       this.firstName = fname;
  10.       this.lastName = lname;
  11.       this.salary = salary;
  12.    }
  13.    
  14.    public int getId() {
  15.       return id;
  16.    }
  17.    
  18.    public void setId( int id ) {
  19.       this.id = id;
  20.    }
  21.    
  22.    public String getFirstName() {
  23.       return firstName;
  24.    }
  25.    
  26.    public void setFirstName( String first_name ) {
  27.       this.firstName = first_name;
  28.    }
  29.    
  30.    public String getLastName() {
  31.       return lastName;
  32.    }
  33.    
  34.    public void setLastName( String last_name ) {
  35.       this.lastName = last_name;
  36.    }
  37.    
  38.    public int getSalary() {
  39.       return salary;
  40.    }
  41.    
  42.    public void setSalary( int salary ) {
  43.       this.salary = salary;
  44.    }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement