Guest User

Untitled

a guest
Oct 21st, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. public class MiNumero {
  2. private int Valor;
  3. private int sumNumero;
  4. private int restNumero;
  5. private int camValor;
  6.  
  7. public MiNumero(int Valor) {
  8. this.Valor = Valor;
  9. }
  10.  
  11. public int getCamValor() {
  12. return camValor;
  13. }
  14.  
  15. public void setCamValor(int camValor) {
  16. this.camValor = camValor;
  17. }
  18.  
  19. public int getSumNumero() {
  20. return sumNumero;
  21. }
  22.  
  23. public void setSumNumero(int sumNumero) {
  24. this.sumNumero = sumNumero;
  25. }
  26.  
  27. public int getRestNumero() {
  28. return restNumero;
  29. }
  30.  
  31. public void setRestNumero(int restNumero) {
  32. this.restNumero = restNumero;
  33. }
  34.  
  35. public int getValor() {
  36. return Valor;
  37. }
  38.  
  39. public int getDoble() {
  40. return Valor * 2;
  41. }
  42.  
  43. public int getTriple() {
  44. return Valor * 3;
  45. }
  46.  
  47. public int getCuadriple() {
  48. return Valor * 4;
  49. }
  50.  
  51. public void setValor(int Valor) {
  52. this.Valor = Valor;
  53. }
  54.  
  55. public int cambiaNumero(int camValor) {
  56. return Valor = camValor;
  57. }
  58.  
  59. public int suma(int sumNumero) {
  60. return Valor + sumNumero;
  61. }
  62.  
  63. public int resta(int restNumero) {
  64. return Valor - restNumero;
  65. }
  66.  
  67. import java.util.Scanner;
Add Comment
Please, Sign In to add comment