forked from digitalinnovationone/desafio01-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.ts
More file actions
25 lines (22 loc) · 831 Bytes
/
Copy pathapp.ts
File metadata and controls
25 lines (22 loc) · 831 Bytes
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
import { CompanyAccount } from "./class/CompanyAccount";
import { ExampleAccount } from "./class/ExampleAccount";
import { PeopleAccount } from "./class/PeopleAccount";
const peopleAccount: PeopleAccount = new PeopleAccount(1, "Nath", 10);
peopleAccount.getName();
peopleAccount.deposit(22);
peopleAccount.withdraw(10);
peopleAccount.getBalance();
console.log(peopleAccount);
const companyAccount: CompanyAccount = new CompanyAccount("DIO", 20);
companyAccount.getName();
companyAccount.deposit(22);
companyAccount.withdraw(10);
companyAccount.getBalance();
companyAccount.getLoan(10);
console.log(companyAccount);
const exampleAccount: ExampleAccount = new ExampleAccount("Artur", 17);
exampleAccount.getName();
exampleAccount.deposit(22);
exampleAccount.withdraw(10);
exampleAccount.getBalance();
console.log(exampleAccount);