Files
004_comission/_resources/it114105/itp4507/Assignment/20-21/src/ChineseStyleLunchSet.java
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

46 lines
1.2 KiB
Java

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author JerryKwok
*/
public class ChineseStyleLunchSet extends LunchSet{
public ChineseStyleLunchSet(String mainDish, int price, int availableCount) {
super(mainDish, price, availableCount);
}
public static String getDrink(String drinkCode){
String drink = "";
switch(drinkCode){
case "h":
drink = "Hot Tea";
break;
case "i":
drink = "Iced Tea";
}
return drink;
}
public String getSideDish(){
return "rice, Chinese soup, Chinese tea";
}
public String getDetails(){
return "Chinese style Business Set Lunch\n" +
"main dish: " + super.getMainDish() + "\n"
+ "with " + getSideDish() + "\n" +
"price: " + super.getPrice() + "\n"
+ "available count: " + super.getAvailableCount();
}
public LunchSetChineseStyleMemento saveMemento(){
return new LunchSetChineseStyleMemento(this);
}
}