Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Valores {
- private Integer valorA,valorB,valorC,soma;
- public Integer getValorA() {
- return valorA;
- }
- public void setValorA(Integer valorA) {
- this.valorA = valorA;
- }
- public Integer getValorB() {
- return valorB;
- }
- public void setValorB(Integer valorB) {
- this.valorB = valorB;
- }
- public Integer getValorC() {
- return valorC;
- }
- public void setValorC(Integer valorC) {
- this.valorC = valorC;
- }
- public Integer getSoma() {
- return soma;
- }
- public void setSoma() {
- this.soma = this.valorA+this.valorB;
- }
- public void verificar(){
- if (this.soma<this.valorC){
- System.out.println("Valor da soma é menor que C");
- } else {
- System.out.println("Valor da soma é maior que C");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement