Skip to content

Commit

Permalink
pequenas modificaçoes e jogados os métodos na main(principal)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiago-vivan committed Mar 21, 2021
1 parent 1e2c9e9 commit 412aa16
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/tp03/Convidado.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@
public class Convidado extends Pessoa {

private boolean confirmado;;
convidado1 = new pessoa;
Convidado convidado = new Convidado();
Random random = new Random();


public boolean isConfirmado() {
return confirmado;
}
public void setConfirmado(boolean confirmado) {
this.confirmado = confirmado;
}

/* classe de convidados- confirmados-nome */
}

10 changes: 7 additions & 3 deletions src/tp03/Evento.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

public class Evento {

private String nomeEvento;
private static String nomeEvento;
private static Usuario nomeUs ;

public String setNomeEvento() {
setNomeEvento().toString("evento do " + get. )

public static String setNomeEvento() {

System.out.println("festa do " + Usuario.getNomeUs());
return nomeEvento;
}


Expand Down
8 changes: 8 additions & 0 deletions src/tp03/Principal.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

public class Principal {



public static void main(String[] args) {
// TODO Auto-generated method stub




Usuario.lerNomeUs();

Evento.setNomeEvento();

Gastos.lerGasto();

Orçamento.lerOrç();
Expand Down
21 changes: 20 additions & 1 deletion src/tp03/Usuario.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
package tp03;

import java.util.Scanner;

public class Usuario extends Pessoa{

private String nomeUs;
private static String nomeUs = "";

public static String lerNomeUs() {
System.out.println("informe o nome do usuario:");
Scanner ler = new Scanner(System.in);
return nomeUs = ler.next();

}


public static String getNomeUs() {
return nomeUs;
}

public void setNomeUs(String nomeUs) {
Usuario.nomeUs = nomeUs;
}

}

0 comments on commit 412aa16

Please sign in to comment.