-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoador.java
More file actions
91 lines (79 loc) · 2.64 KB
/
Doador.java
File metadata and controls
91 lines (79 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package Modulo1;
import java.util.Scanner;
public class Doador implements Dados {
Scanner leia = new Scanner(System.in);
String nome, email, tel, cidade, dispo;
private String estadoDispo;
public Doador() {
this.estadoDispo = estadoDispo;
}
//getters e setters
public String getEstadoDispo() {
return estadoDispo;
}
public void setEstadoDispo(String estadoDispo) {
this.estadoDispo = estadoDispo;
}
@Override
public void nome() {
System.out.println("*********************************************");
System.out.println("* DOE AQUI O APARELHO QUE VOCÊ NÃO USA MAIS *");
System.out.println("*********************************************");
System.out.print("Digite seu nome: ");
nome = leia.next();
leia.nextLine();
}
@Override
public void email() {
System.out.print("Digite seu email: ");
email = leia.next();
leia.nextLine();
}
@Override
public void telefone() {
System.out.print("Digite seu telefone: ");
tel = leia.next();
}
@Override
public void cidade() {
System.out.print("Digite seu cidade: ");
cidade = leia.next();
}
@Override
public void dispositivo() {
System.out.print("Qual(is) dispositivo(s) vai doar? : ");
dispo = leia.next();
System.out.print("Quantos dispositivos está doando: \n[1] - 1 Produto\n[2] - 2 Produto ou MAIS\n");
int quatidade = leia.nextInt();
switch(quatidade) {
case 1:
System.out.println("\nOBRIGADO PELA SUA DOAÇÃO! VOCÊ ESTÁ AJUDANDO UMA PESSOA A CONTINUAR ESTUDANO!");
break;
case 2:
System.out.println("\nOBRIGADO PELA SUA DOAÇÃO! VOCÊ ESTÁ AJUDANDO DUAS PESSOAS A CONTINUAR ESTUDANO!");
break;
default:
System.out.println("\nOBRIGADO PELA SUA DOAÇÃO!");
}
}
@Override
public void status() {
System.out.println("\n --------------------------------------------------- ");
System.out.println("|***********************DOADOR***********************|");
System.out.println(" ----------------------------------------------------\n");
System.out.println("Doador(a): " + nome);
System.out.println("E-Mail: " + email);
System.out.println("Tel: " + tel);
System.out.println("Cidade: " + cidade);
System.out.println("Dispositivo(s) doado(s): " + dispo);
}
public void doador() {
System.out.println("\n --------------------------------------------------- ");
System.out.println("|***********************DOADOR***********************|");
System.out.println(" ----------------------------------------------------\n");
System.out.println("Doador(a): Karine Antunes Farias");
System.out.println("E-mail: karineantunesfarias@gmail.com.br");
System.out.println("Telefone: (64) 57344-8923");
System.out.println("Cidade: Campinas");
}
}