55 lines
614 B
Java
55 lines
614 B
Java
public enum HotelMeal{
|
|
|
|
|
|
Breakfast(7,30), Lunch(12,15), Dinner(19,45);
|
|
|
|
|
|
|
|
private int hh, mm;
|
|
|
|
//Konstruktor
|
|
HotelMeal (int a, int b){
|
|
this.hh = a;
|
|
this.mm = b;
|
|
}
|
|
|
|
|
|
public int foodtime(){
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
//Methoden
|
|
public int getHour(){
|
|
return this.hh;
|
|
}
|
|
|
|
public int getMinute(){
|
|
return this.mm;
|
|
}
|
|
|
|
public String getTime(){
|
|
return this.hh + ":" + this.mm;
|
|
}
|
|
|
|
/*
|
|
public String Meal(HotMeal a){
|
|
if (time = 7:30){
|
|
System.out.println("Breakfast");
|
|
}
|
|
else if (time = 12:15){
|
|
System.out.println("Lunch");
|
|
}
|
|
else if (time = 19:45){
|
|
System.out.println("Dinner");
|
|
}
|
|
|
|
else {System.out.println("No Food!");}
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|