File tree Expand file tree Collapse file tree 6 files changed +84
-104
lines changed
src/main/java/com/example Expand file tree Collapse file tree 6 files changed +84
-104
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package com .example ;
2+
3+ import javafx .scene .paint .Material ;
4+
5+ public class Metodo {
6+
7+ Pessoa pessoa2 = new Pessoa ();
8+ Pessoa pessoa3 = new Pessoa ();
9+
10+
11+
12+
13+
14+
15+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package com .example ;
2+ import java .util .Scanner ;
3+
4+ public class Pessoa {
5+ private String nome ;
6+ public String getNome () {
7+ return nome ;
8+ }
9+
10+ public void setNome (String nome ) {
11+ this .nome = nome ;
12+ }
13+
14+ public float getAltura () {
15+ return altura ;
16+ }
17+
18+ public void setAltura (float altura ) {
19+ this .altura = altura ;
20+ }
21+
22+ public int getIdade () {
23+ return idade ;
24+ }
25+
26+ public void setIdade (int idade ) {
27+ this .idade = idade ;
28+ }
29+
30+ public String [] getEndereco () {
31+ return endereco ;
32+ }
33+
34+ public void setEndereco (String [] endereco ) {
35+ this .endereco = endereco ;
36+ }
37+
38+ private float altura ;
39+ private int idade ;
40+ private String [] endereco = new String [200 ];
41+
42+ public static void main (String [] args ) {
43+
44+
45+ Pessoa pessoa = new Pessoa ();
46+ System .out .println ("Seja Bem vindo(a)" + "\n " + " Digite o seu nome: " );
47+ Scanner scan = new Scanner (System .in );
48+ pessoa .nome = scan .nextLine ();
49+
50+ System .out .println ("Seja Bem vindo(a)" + "\n " + " Digite a sua altura: " );
51+ pessoa .altura = scan .nextFloat ();
52+
53+ System .out .println ("Digite a sua idade" );
54+ pessoa .idade = scan .nextInt ();
55+
56+ System .out .println ("Digite o seu endereço" );
57+ pessoa .endereco [0 ] = scan .next ();
58+
59+
60+ System .out .println ("Prezada " + pessoa .nome + " sua idade é: " + pessoa .idade + " seu endereco é: " + pessoa .endereco );
61+ // System.out.println(" A sua alatura é: " pessoa.altura);
62+
63+
64+
65+
66+
67+ }
68+
69+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments