Skip to content

Instantly share code, notes, and snippets.

@albuquerquev
Created June 22, 2015 21:35
Show Gist options
  • Save albuquerquev/4394acb284cdfed04ff5 to your computer and use it in GitHub Desktop.
Save albuquerquev/4394acb284cdfed04ff5 to your computer and use it in GitHub Desktop.
public class Car {
private String engine;
private String color;
private boolean climateControl;
private boolean satNav;
private boolean sunRoof;
public Car(String engine, String color) {
this(engine, color, false, false, false);
}
public Car(String engine, String color, boolean climateControl) {
this(engine, color, climateControl, false, false);
}
public Car(String engine, String color, boolean climateControl, boolean satNav) {
this(engine, color, climateControl, satNav, false);
}
public Car(String engine, String color, boolean climateControl, boolean satNav, boolean sunRoof) {
this.engine = engine;
this.color = color;
this.climateControl = climateControl;
this.satNav = satNav;
this.sunRoof = sunRoof;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment