-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
66 lines (48 loc) · 2.15 KB
/
index.js
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
import { Cliente } from "./Conta/Cliente.js";
import { Gerente } from "./Funcionario/Gerente.js";
import { Diretor } from "./Funcionario/Diretor.js";
import { SistemaAutenticacao } from "./SistemaAutenticacao.js";
const diretor = new Diretor("Rodrigo", 10000, 12345678900);
diretor.cadastrarSenha("123456789")
const gerente = new Gerente ("Ricardo", 5000, 12378945600);
gerente.cadastrarSenha("123")
const cliente = new Cliente("Lais", 78945612379, "456");
const direLogado = SistemaAutenticacao.login(diretor, "123456789");
const gereLogado = SistemaAutenticacao.login(gerente, "123");
const clieLogado = SistemaAutenticacao.login(cliente, "456");
console.log(direLogado, gereLogado, clieLogado);
/* CONTAS
import { Cliente } from "./Conta/Cliente.js";
import { Conta } from "./Conta/Conta.js";
import { ContaCorrente } from "./Conta/ContaCorrente.js";
import { ContaPoupanca } from "./Conta/ContaPoupanca.js";
import { ContaSalario } from "./Conta/ContaSalario.js";
const cliente1 = new Cliente("Ricardo", 11122233309);
//const cliente2 = new Cliente("Sarah", 11122233310);
//const cliente3 = new Cliente("Alice", 11122233311);
const contaCorrenteRicardo = new ContaCorrente(0, cliente1, 1001);
contaCorrenteRicardo.depositar(100);
contaCorrenteRicardo.depositar(200);
contaCorrenteRicardo.depositar(100);
contaCorrenteRicardo.sacar(150);
//const contaCorrenteSarah = new ContaCorrente(1002, cliente2);
//contaCorrenteSarah.depositar(1800);
//const contaCorrenteAlice = new ContaCorrente(1003, cliente3);
//contaCorrenteRicardo.transferir(200, contaCorrenteSarah);
//contaCorrenteSarah.transferir(200, contaCorrenteAlice);
const contaPoupanca = new ContaPoupanca(50, cliente1, 1001);
//contaPoupanca.sacar(10);
const contaSalario = new ContaSalario(cliente1);
contaSalario.depositar(100);
contaSalario.sacar(10);
//const conta = new Conta(0, cliente1, 1001);
//console.log(contaPoupanca);
//console.log(contaCorrenteRicardo);
//console.log(contaCorrenteSarah);
//console.log(contaCorrenteAlice);
//console.log(`Número de contas: ${ContaCorrente.numeroDeContas}`);
console.log(contaPoupanca);
console.log(contaCorrenteRicardo);
//console.log(conta);
console.log(contaSalario);
*/