Skip to content

Instantly share code, notes, and snippets.

@jhbruhn
Created June 25, 2012 11:47
Show Gist options
  • Save jhbruhn/2988141 to your computer and use it in GitHub Desktop.
Save jhbruhn/2988141 to your computer and use it in GitHub Desktop.
HeinzPeda
package corp.tuamater.werkstatt;
import java.util.Random;
public class Auto {
public enum Creator {
AUDI, VW, PEUGOT, RENAULT
};
private Creator creator;
private double width = 2.5, height = 1.5, depth = 5;
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public double getDepth() {
return depth;
}
public void setDepth(double depth) {
this.depth = depth;
}
public Creator getCreator() {
return creator;
}
public void setCreator(Creator creator) {
this.creator = creator;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
public Auto(Creator creator) {
this.setCreator(creator);
}
public int repairCost() {
return new Random().nextInt(100);
}
public void repair() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment