jogo.ts 730 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
export class Jogo {
    private name: string;
    private developer: string;
    private producer: string;
    private release: Date;
    private price: number;

    constructor(name, developer, producer, release, price) {
        this.name = name;
        this.developer = developer;
        this.producer = producer;
        this.release = release;
        this.price = price;
    }

    public writeinfo(): string {
17
        return "nome: " + this.name + " preço: " + this.price + " desenvolvedora: " + this.developer + " produtora: " + this.producer + " lançamento: " + this.release+ ".";
18
    }
19 20 21 22 23 24
    public getname(): string {
        return this.name;
    }
    public getprice(): number {
        return this.price;
    }
25
}