Skip to content

Commit 95f2a5c

Browse files
committed
Alpha 0.0.4
1 parent fa7b4f5 commit 95f2a5c

5 files changed

Lines changed: 142 additions & 1 deletion

File tree

src/MapperAI.Core/MapperAI.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Title>MapperAI-Alpha</Title>
88
<Authors>Dridev</Authors>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
10-
<Version>0.0.4-alpha</Version>
10+
<Version>0.0.5-alpha</Version>
1111
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1212
<RepositoryUrl>https://github.com/01Dri/MapperAI</RepositoryUrl>
1313
<RootNamespace>MapperAI.Core</RootNamespace>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace MapperAI.Test.MappedClasses {
2+
export class Carro {
3+
private marca: string;
4+
private modelo: string;
5+
private ano: number;
6+
7+
constructor(marca: string, modelo: string, ano: number) {
8+
this.marca = marca;
9+
this.modelo = modelo;
10+
this.ano = ano;
11+
}
12+
13+
public getMarca(): string {
14+
return this.marca;
15+
}
16+
17+
public getModelo(): string {
18+
return this.modelo;
19+
}
20+
21+
public getAno(): number {
22+
return this.ano;
23+
}
24+
25+
public exibirInformacoes(): void {
26+
console.log(`Marca: ${this.marca}`);
27+
console.log(`Modelo: ${this.modelo}`);
28+
console.log(`Ano: ${this.ano}`);
29+
}
30+
31+
public isAntigo(): boolean {
32+
const anoAtual = new Date().getFullYear();
33+
return (anoAtual - this.ano) > 20;
34+
}
35+
}
36+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
namespace MapperAI.Test.MappedClasses {
2+
export class ContaBancaria {
3+
private numero: string;
4+
private titular: string;
5+
private saldo: number;
6+
7+
constructor(numero: string, titular: string, saldo: number = 0) {
8+
this.numero = numero;
9+
this.titular = titular;
10+
this.saldo = saldo;
11+
}
12+
13+
public depositar(valor: number): string {
14+
if (valor > 0) {
15+
this.saldo += valor;
16+
return `Depósito de R$${valor} realizado com sucesso. Novo saldo: R$${this.saldo}.`;
17+
} else {
18+
return "Valor de depósito inválido.";
19+
}
20+
}
21+
22+
public sacar(valor: number): string {
23+
if (valor > 0 && valor <= this.saldo) {
24+
this.saldo -= valor;
25+
return `Saque de R$${valor} realizado com sucesso. Saldo restante: R$${this.saldo}.`;
26+
} else {
27+
return "Saldo insuficiente ou valor de saque inválido.";
28+
}
29+
}
30+
31+
public consultarSaldo(): string {
32+
return `Saldo atual: R$${this.saldo}.`;
33+
}
34+
}
35+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace MapperAI.Test.MappedClasses {
2+
export class Student {
3+
private name: string;
4+
private age: number;
5+
private student_id: string;
6+
7+
constructor(name: string, age: number, student_id: string) {
8+
this.name = name;
9+
this.age = age;
10+
this.student_id = student_id;
11+
}
12+
13+
public getName(): string {
14+
return this.name;
15+
}
16+
17+
public getAge(): number {
18+
return this.age;
19+
}
20+
21+
public getStudentId(): string {
22+
return this.student_id;
23+
}
24+
25+
public isAdult(): boolean {
26+
return this.age >= 18;
27+
}
28+
}
29+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace MapperAI.Test.MappedClasses {
2+
export class Usuario {
3+
private username: string;
4+
private email: string;
5+
private password: string;
6+
7+
constructor(user: string, mail: string, pass: string) {
8+
this.username = user;
9+
this.email = mail;
10+
this.password = pass;
11+
}
12+
13+
public getUsername(): string {
14+
return this.username;
15+
}
16+
17+
public setUsername(user: string): void {
18+
this.username = user;
19+
}
20+
21+
public getEmail(): string {
22+
return this.email;
23+
}
24+
25+
public setEmail(mail: string): void {
26+
this.email = mail;
27+
}
28+
29+
public getPassword(): string {
30+
return this.password;
31+
}
32+
33+
public setPassword(pass: string): void {
34+
this.password = pass;
35+
}
36+
37+
public displayInfo(): void {
38+
console.log(`Username: ${this.username}, Email: ${this.email}`);
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)