Skip to content

Commit

Permalink
Add Menu.java, Dish.java, Ingredient.java and their test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyi105 committed Oct 14, 2023
1 parent 4c760d5 commit ce21b49
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/seedu/duke/data/Menu.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package seedu.duke.data;

import seedu.duke.data.dish.Dish;

import java.util.ArrayList;

public class Menu {
private ArrayList<Dish> menuItems;

public Menu(ArrayList<Dish> menuItems) {
this.menuItems = menuItems;
}
}
15 changes: 15 additions & 0 deletions src/main/java/seedu/duke/data/dish/Dish.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package seedu.duke.data.dish;

import java.util.ArrayList;

public class Dish {
private String name;
private ArrayList<Ingredient> ingredients;
private double price;

public Dish(String name, ArrayList<Ingredient> ingredients, double price) {
this.name = name;
this.ingredients = ingredients;
this.price = price;
}
}
9 changes: 9 additions & 0 deletions src/main/java/seedu/duke/data/dish/Ingredient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package seedu.duke.data.dish;

public class Ingredient {
private final String name;

public Ingredient(String name) {
this.name = name;
}
}
7 changes: 7 additions & 0 deletions src/test/java/seedu/duke/data/MenuTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package seedu.duke.data;

//import static org.junit.jupiter.api.Assertions.*;

class MenuTest {

}
7 changes: 7 additions & 0 deletions src/test/java/seedu/duke/data/dish/DishTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package seedu.duke.data.dish;

//import static org.junit.jupiter.api.Assertions.*;

class DishTest {

}
7 changes: 7 additions & 0 deletions src/test/java/seedu/duke/data/dish/IngredientTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package seedu.duke.data.dish;

//import static org.junit.jupiter.api.Assertions.*;

class IngredientTest {

}

0 comments on commit ce21b49

Please sign in to comment.