-
Notifications
You must be signed in to change notification settings - Fork 0
/
TesteFael.java
57 lines (47 loc) · 2.09 KB
/
TesteFael.java
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
import java.util.ArrayList;
public class TesteFael {
public static void main(String[] args) {
ArrayList<Cliente> cliente = new ArrayList<>();
ArrayList<Veiculo> veiculo = new ArrayList<>();
cliente.add(new Cliente("Rafael Ávila dos Santos", 22, "13485144690"));
cliente.add(new Cliente("Rossini Russo", 23, "11122233344"));
cliente.add(new Cliente("Adrielle Cunha da Silva", 21, "55566677788"));
cliente.add(new Cliente("Eduardo Henrique Fernandes", 30, "99911122233"));
for (Cliente c : cliente) {
System.out.println(c);
}
System.out.println("-----------------------------------------------------------");
veiculo.add(new Moto("Suzuki", "Moto", "Manual", "HM2J71", 23, "Trail"));
veiculo.add(new Combustao("Ford", "Carro a Combustao", "Manual", "RAHJ11", 23, 4, 50));
veiculo.add(new Moto("BMW", "Moto", "Automatico", "AV221K", 23, "Trail"));
cliente.get(0).reservarVeiculo(5, 2, 12, veiculo.get(0));
cliente.get(2).reservarVeiculo(5, 2, 12, veiculo.get(2));
for (Cliente c : cliente) {
System.out.println(c);
System.out.println("-------------------------");
}
/*
* System.out.
* println("-------------------Veiculos Cadastrados: -------------------");
* for (Veiculo v : veiculo) {
* System.out.println(v);
* System.out.println("-------------------------");
* }
*
* System.out.
* println("-------------------Nome dos Clientes Cadastrados: -------------------"
* );
* for (Cliente c : cliente) {
* System.out.println(c.getNome());
* System.out.println("-------------------------");
* }
*/
System.out.println("-----------------------------------------------------------");
cliente.get(0).cancelarReserva();
cliente.get(2).cancelarReserva();
for (Cliente c : cliente) {
System.out.println(c);
System.out.println("-------------------------");
}
}
}