Advertisement
Guest User

funcionarios

a guest
Sep 22nd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package bytebank;
  2.  
  3. public class Funcionario {
  4.    
  5.     private String nome;
  6.     private long cpf;
  7.     private double salario;
  8.     private static int funcionariosContratados;
  9.    
  10.     public String getNome() {
  11.         return nome;
  12.     }
  13.     public void setNome(String nome) {
  14.         this.nome = nome;
  15.     }
  16.     public long getCpf() {
  17.         return cpf;
  18.     }
  19.     public void setCpf(int cpf) {
  20.         this.cpf = cpf;
  21.     }
  22.     public double getSalario() {
  23.         return salario;
  24.     }
  25.     public void setSalario(double salario) {
  26.         this.salario = salario;
  27.     }
  28.    
  29.  
  30.     public Funcionario(String nome, long cpf, double salario) {
  31.         this.nome = nome;
  32.         this.cpf = cpf;
  33.         this.salario = salario;
  34.         funcionariosContratados++;
  35.     }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement