2020-05-03 15:12:03 +02:00
|
|
|
/**
|
|
|
|
* the class is defined with the export keyword to make it usable outside of the current file
|
|
|
|
*/
|
|
|
|
export class Car {
|
|
|
|
// define the fields
|
|
|
|
manufacturer: string = '';
|
|
|
|
model: string = '';
|
|
|
|
|
2020-05-04 19:27:23 +02:00
|
|
|
// define the method print_info
|
2020-05-03 15:12:03 +02:00
|
|
|
print_info() {
|
|
|
|
console.log('Car Information:');
|
|
|
|
console.log(`- manufacturer: ${this.manufacturer}`);
|
|
|
|
console.log(`- model: ${this.model}`);
|
|
|
|
}
|
|
|
|
}
|