-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCars.java
More file actions
56 lines (36 loc) · 1.07 KB
/
Cars.java
File metadata and controls
56 lines (36 loc) · 1.07 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package de.telran.objects;
public class Cars {
private String Manufacturer;
private String Model;
private String Colour;
private int ProductionDate;
public Cars () {
}
public Cars (String Manufacturer,
String Model,
String Colour,
int ProductionDate) {
this.Manufacturer = Manufacturer;
this.Model = Model;
this.Colour = Colour;
this.ProductionDate=ProductionDate;
}
public void setManufacturer(String Manufacturer) {
this.Manufacturer = Manufacturer;
}
public void setModel(String Model){
this.Model=Model;
}
public void setColour(String Colour) {
this.Colour=Colour;
}
public void setProductionDate(int ProductionDate ){
this.ProductionDate=ProductionDate;
}
public String toString() {
return "Manufacturer:" + Manufacturer + "\n" +
"Model:" + Model + "\n" +
"Colour:" + Colour + "\n" +
"Production Date:" + ProductionDate;
}
}