Open ADWrobo opened 3 months ago
User Action | System Response |
---|---|
User accesses the recipe search page. | System displays the search page with options for parameters (ingredients, ethnic origin, etc.). |
User inputs search criteria into the search bar and selects search parameters. | System validates the input and prepares to search. |
User clicks the 'Search' button. | System queries the database with the provided criteria and parameters. |
System retrieves and displays a list of recipes matching the criteria. | |
User selects a recipe from the list. | System displays the selected recipe with full details, including ingredients, preparation steps, and multimedia content if available. |
1. Food Enthusiast - Likely more of a role than a class. 2. Recipe - A class representing the recipes. 3. Ingredient - A class for ingredients used in recipes. 4. Ethnic Origin - Could be represented as a class or an attribute of Recipe. 5. Search Page - Represents the UI component where users can input search criteria. 6. Search Parameters - Could be attributes of the search functionality, not necessarily a class. 7. Search Criteria - Similar to Search Parameters, could be attributes. 8. Search Bar - Part of the Search Page, could be considered an attribute or part of the UI design rather than a class. 9. System - Represents the backend system; typically, we look into its responsibilities to identify classes. 10. Database - A class or service responsible for storing and retrieving recipes. 11. List of Recipes - A result set of the Recipe class. 12. Selected Recipe - A specific instance of the Recipe class. 13. Multimedia Content - Could be a class associated with Recipe for storing multimedia details.
1. Recipe - Responsibilities:
2. Ingredient - Responsibilities:
3. Database (Appropriate to consider a class?) - Responsibilities:
4. Search Functionality (Not a class, but functionalities within the system) - Responsibilities:
5. Multimedia Content - Responsibilities:
Scene: A cozy, well-lit kitchen with a laptop open on the counter. Alex, a person with a keen interest in culinary adventures, is standing in front of the laptop, eager to discover a new recipe.
Alex accesses the recipe search page. The screen brightens, revealing a welcoming interface with various options for search parameters such as ingredients and ethnic origins.
Alex: (musing to themselves) “I think I’m in the mood for East-Asian food today. Let’s see what we can find!”
Alex types in their criteria into the search bar, selecting 'Thai' for ethnic origin and 'chicken' for the main ingredient.
System: (displays a message) "Great choice! Give us a moment while we find the perfect recipes for you.”
Alex clicks the 'Search' button, then waits for the perfect recipe. The system processes the input, querying the database with the provided criteria and parameters.
System: (proudly displaying a list) "Here are the recipes that match your criteria. We've found some exciting Thai chicken recipes for you to explore.”
Alex scans through the list, intrigued by the variety of options.
After a moment of consideration, Alex selects a recipe titled "Spicy Thai Chicken Curry." The system responds by displaying the selected recipe in full detail, including ingredients, preparation steps, and enticing multimedia content showing the dish.
Alex: (excitedly) "This is great! It looks absolutely delicious, and I have all the ingredients. Tonight's dinner is going to be special.”
Alex begins to gather the ingredients, the laptop screen displaying the steps one by one, guiding them through the cooking process.
As Alex follows the steps, the meal begins to come together.
Alex: (with a sense of accomplishment) "And it's done! This was exactly the adventure I was looking for. Can't wait to dig in and then explore more recipes from around the world."
The scene fades with Alex sitting at the dining table, taking the first bite of the Spicy Thai Chicken Curry, a satisfied smile spreading across their face. The journey from discovery to dining has been a delightful adventure, and Alex knows that this is just the beginning of their culinary explorations thanks to the Custom Recipe Sharing Platform (copyright pending haha).
1. Recipe
Attributes:
ID: long
Name: string
Ingredients: list of Ingredient
PreparationSteps: list of string
EthnicOrigin: string (optional)
Difficulty: string (optional)
MultimediaContent: MultimediaContent (optional)
Methods:
AddIngredient(ingredient: Ingredient): void ?
AddStep(step: string): void ?
2. Ingredient
Attributes:
ID: long
Name: string
Quantity: string
Methods:
UpdateQuantity(newQuantity: string): void ?
_3. MultimediaContent
Attributes:
Images: list of string (URLs or file paths)
Videos: list of string (URLs or file paths)
Methods:
AddImage(imagePath: string): void
AddVideo(videoPath: string): void_
Relationships:
Recipe <-> Ingredient: Aggregation (A recipe aggregates ingredients)
Code has been merged into Main branch. Search by ingredient is still WIP pending figuring out how to do the query properly, but otherwise search functions properly. MultimediaContent hasn't been implemented yet beyond the basic files on account of that being a part of a different story.
Update class diagrams from IntelliJ are included as an image file on the main branch in the repo.
Associated with Feature 1: Advanced Recipe Browsing Input: The user inputs search criteria such as ingredients, ethnic origin, dietary restrictions, or recipe difficulty. Activation: The user submits the search request. Action: The platform searches the database for recipes matching the criteria. Output: The user is presented with a list of recipes matching their search criteria.