Created
June 25, 2012 11:47
-
-
Save jhbruhn/2988141 to your computer and use it in GitHub Desktop.
HeinzPeda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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