Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
commit the activity and food and menu
- Loading branch information
jsn13002
authored and
jsn13002
committed
Feb 26, 2016
1 parent
20aeb62
commit cbcfa0f
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package model; | ||
|
||
public class activity { | ||
public String title; | ||
public String details; | ||
public String misc; | ||
// Constructor | ||
public activity(String a, String b, String c){ | ||
this.title=a; | ||
this.details=b; | ||
this.misc=c; | ||
} | ||
activity newactivity; | ||
activity joke; | ||
activity games; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package model; | ||
|
||
public class foodAndMenu { | ||
public String foodname; | ||
//We need to add the image in the foodAndMenu Contructor | ||
public String descriptionfood; | ||
public String recipe; | ||
|
||
//Constructor | ||
public foodAndMenu(String a,String s, String k){ | ||
this.foodname=a; | ||
this.descriptionfood=s; | ||
this.recipe=k; | ||
} | ||
foodAndMenu appetizer; | ||
foodAndMenu entree; | ||
foodAndMenu desert; | ||
foodAndMenu snack; | ||
//Getters | ||
public void setEntree(String x, String s, String k){ | ||
entree.foodname=x; | ||
entree.descriptionfood=s; | ||
entree.recipe=k; | ||
} | ||
public void setappetizer(String x,String s, String k){ | ||
appetizer.foodname=x; | ||
appetizer.descriptionfood=s; | ||
appetizer.recipe=k; | ||
} | ||
public void setdesert (String x,String s, String k){ | ||
desert.foodname=x; | ||
desert.descriptionfood=s; | ||
desert.recipe=k; | ||
} | ||
public void setsnack(String x,String s, String k){ | ||
snack.foodname=x; | ||
snack.descriptionfood=s; | ||
snack.recipe=k; | ||
} | ||
//Setters | ||
public foodAndMenu getAppetizer(String k){ | ||
if (appetizer.foodname.equalsIgnoreCase(k)){ | ||
return appetizer; | ||
} | ||
else { | ||
System.out.println("There is no such item on the menu"); | ||
return null; | ||
} | ||
} | ||
public foodAndMenu getDesert(String k){ | ||
if (desert.foodname.equalsIgnoreCase(k)){ | ||
return desert; | ||
} | ||
else { | ||
System.out.println("There is no such item on the menu"); | ||
return null; | ||
} | ||
} | ||
public foodAndMenu getSnack(String k){ | ||
if (snack.foodname.equalsIgnoreCase(k)){ | ||
return snack; | ||
} | ||
else { | ||
System.out.println("There is no such item on the menu"); | ||
return null; | ||
} | ||
} | ||
public foodAndMenu getEntree(String k){ | ||
if (entree.foodname.equalsIgnoreCase(k)){ | ||
return entree; | ||
} | ||
else { | ||
System.out.println("There is no such item on the menu"); | ||
return null; | ||
} | ||
} | ||
|
||
} |