Advertisement
srvelososantos

Untitled

May 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. package funcionarios_pizzaria;
  2.  
  3. /**
  4. *
  5. * @author leona
  6. */
  7. public class Funcionarios {
  8.  
  9. public double salario;
  10. public String setor;
  11. public String nome;
  12. public int telefone;
  13. public int idade;
  14. public int tempo_contratado;
  15.  
  16. public Funcionarios(double salario, String setor, String nome, int telefone, int idade,int tempo_contratado) {
  17. this.salario = salario;
  18. this.setor = setor;
  19. this.nome = nome;
  20. this.telefone = telefone;
  21. this.idade = idade;
  22. this.tempo_contratado = tempo_contratado;
  23.  
  24. }
  25.  
  26.  
  27.  
  28. public double getSalario() {
  29. return salario;
  30. }
  31.  
  32. public void setSalario(double salario) {
  33. this.salario = salario;
  34. }
  35.  
  36. public String getSetor() {
  37. return setor;
  38. }
  39.  
  40. public void setSetor(String setor) {
  41. this.setor = setor;
  42. }
  43.  
  44. public String getNome() {
  45. return nome;
  46. }
  47.  
  48. public void setNome(String nome) {
  49. this.nome = nome;
  50. }
  51.  
  52. public int getTelefone() {
  53. return telefone;
  54. }
  55.  
  56. public void setTelefone(int telefone) {
  57. this.telefone = telefone;
  58. }
  59.  
  60. public int getIdade() {
  61. return idade;
  62. }
  63.  
  64. public void setIdade(int idade) {
  65. this.idade = idade;
  66. }
  67.  
  68. public int getTempo_contratado() {
  69. return tempo_contratado;
  70. }
  71.  
  72. public void setTempo_contratado(int tempo_contratado) {
  73. this.tempo_contratado = tempo_contratado;
  74. }
  75.  
  76.  
  77.  
  78. public double calcula_beneficio(){
  79. return (this.idade*4) + (this.tempo_contratado * (0.50 * this.salario));
  80. }
  81.  
  82. public double acerto(){
  83. return this.tempo_contratado * this.salario;
  84. }
  85.  
  86.  
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement