making field/method more clear
This commit is contained in:
parent
5aad2f7644
commit
c6246aade2
@ -8,6 +8,7 @@ public class Car {
|
|||||||
public String model = "";
|
public String model = "";
|
||||||
public String manufacturer = "";
|
public String manufacturer = "";
|
||||||
|
|
||||||
|
// create the method print_info()
|
||||||
public void print_info() {
|
public void print_info() {
|
||||||
System.out.println("Car Information:");
|
System.out.println("Car Information:");
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,7 @@ export class Car {
|
|||||||
manufacturer: string = '';
|
manufacturer: string = '';
|
||||||
model: string = '';
|
model: string = '';
|
||||||
|
|
||||||
// define the function print_info
|
// define the method print_info
|
||||||
print_info() {
|
print_info() {
|
||||||
console.log('Car Information:');
|
console.log('Car Information:');
|
||||||
console.log(`- manufacturer: ${this.manufacturer}`);
|
console.log(`- manufacturer: ${this.manufacturer}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user