Advertisement
arthur_arw

Empregado.java - Exerc11

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