Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MiNumero {
- private int Valor;
- private int sumNumero;
- private int restNumero;
- private int camValor;
- public MiNumero(int Valor) {
- this.Valor = Valor;
- }
- public int getCamValor() {
- return camValor;
- }
- public void setCamValor(int camValor) {
- this.camValor = camValor;
- }
- public int getSumNumero() {
- return sumNumero;
- }
- public void setSumNumero(int sumNumero) {
- this.sumNumero = sumNumero;
- }
- public int getRestNumero() {
- return restNumero;
- }
- public void setRestNumero(int restNumero) {
- this.restNumero = restNumero;
- }
- public int getValor() {
- return Valor;
- }
- public int getDoble() {
- return Valor * 2;
- }
- public int getTriple() {
- return Valor * 3;
- }
- public int getCuadriple() {
- return Valor * 4;
- }
- public void setValor(int Valor) {
- this.Valor = Valor;
- }
- public int cambiaNumero(int camValor) {
- return Valor = camValor;
- }
- public int suma(int sumNumero) {
- return Valor + sumNumero;
- }
- public int resta(int restNumero) {
- return Valor - restNumero;
- }
- import java.util.Scanner;
Add Comment
Please, Sign In to add comment