Skip to content

Commit 127e210

Browse files
committed
feat: adds Track.java constuctors
1 parent e13c3d8 commit 127e210

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/evanphilakhong/Formula1Car.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Formula1Car {
1515
private TyreCompound currTyre;
1616
private boolean drs;
1717

18-
//Constructors
18+
// constructors
1919
public Formula1Car() {
2020
this.team = null;
2121
this.sponsors = new String[0];

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/evanphilakhong/Track.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ public class Track {
1313
private boolean drsZone;
1414
private Weather weather;
1515

16+
// constructors
17+
public Track() {
18+
this.trackName = "";
19+
this.trackLocation = "";
20+
this.numLaps = 0;
21+
this.trackLengthInKm = 0;
22+
this.drsZone = false;
23+
this.weather = null;
24+
}
25+
1626
public static void main(String[] args) {
1727

1828
}

0 commit comments

Comments
 (0)