For the following prompts, you will be creating and adding to a UML class diagram to meet each requirement. You can draw your UML image by hand and upload a picture of it, or create a digital image using any software of your choice. You can incl an image in your post either by selecting "Insert > Image > Upload Image" in the top menu above the reply window, or by selecting the image icon and then "Upload Image" around the middle of the toolbar above the reply window. 1. Create a UML class diagram for an abstract "Food" class (do your best to show the text in italics). The Food class has tw private member variables: calories (an integer), and expiration date (which has type Date). It also has four public membe methods, which are accessor and mutator methods for each of its variables. 2. Create a class diagram for a concrete class "Cheese", which inherits from "Food". Cheese has one private member variab a String holding the name of the type of cheese it is. It also has two public member methods, which are an accessor and mutator for the cheese type. 3. Add your own new type of food class to the diagram that inherits from Food. Your food must have at least one new member variable or method, which can be anything you want. 4. Add a new class to your diagram called "Recipe". Recipe has two member variables: a list of ingredients (an array of Food items), and the number of minutes it takes to prepare (an integer). The Recipe class also has one member method called makeRecipe(), which takes no parameters and returns a food item. The Recipe class has a standard (bidirectional) relationship with the Food class (think about the multiplicity value for each side of this relationship). Once you have completed the above steps, make a reply showing your completed diagram. The diagram must include the Food, Cheese, and Recipe classes, your own new class, and the relationships between them.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter12: Event-driven Gui Programming, Multithreading, And Animation
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question

JAVA:

 

For the following prompts, you will be creating and adding to a UML class diagram to meet each requirement. You can draw
your UML image by hand and upload a picture of it, or create a digital image using any software of your choice. You can include
an image in your post either by selecting "Insert > Image > Upload Image" in the top menu above the reply window, or by
selecting the image icon and then "Upload Image" around the middle of the toolbar above the reply window.
1. Create a UML class diagram for an abstract "Food" class (do your best to show the text in italics). The Food class has two
private member variables: calories (an integer), and expiration date (which has type Date). It also has four public member
methods, which are accessor and mutator methods for each of its variables.
2. Create a class diagram for a concrete class "Cheese", which inherits from "Food". Cheese has one private member variable:
a String holding the name of the type of cheese it is. It also has two public member methods, which are an accessor and
mutator for the cheese type.
3. Add your own new type of food class to the diagram that inherits from Food. Your food must have at least one new
member variable or method, which can be anything you want.
4. Add a new class to your diagram called "Recipe". Recipe has two member variables: a list of ingredients (an array of Food
items), and the number of minutes it takes to prepare (an integer). The Recipe class also has one member method called
makeRecipe(), which takes no parameters and returns a food item. The Recipe class has a standard (bidirectional)
relationship with the Food class (think about the multiplicity value for each side of this relationship).
Once you have completed the above steps, make a reply showing your completed diagram. The diagram must include the
Food, Cheese, and Recipe classes, your own new class, and the relationships between them.
Transcribed Image Text:For the following prompts, you will be creating and adding to a UML class diagram to meet each requirement. You can draw your UML image by hand and upload a picture of it, or create a digital image using any software of your choice. You can include an image in your post either by selecting "Insert > Image > Upload Image" in the top menu above the reply window, or by selecting the image icon and then "Upload Image" around the middle of the toolbar above the reply window. 1. Create a UML class diagram for an abstract "Food" class (do your best to show the text in italics). The Food class has two private member variables: calories (an integer), and expiration date (which has type Date). It also has four public member methods, which are accessor and mutator methods for each of its variables. 2. Create a class diagram for a concrete class "Cheese", which inherits from "Food". Cheese has one private member variable: a String holding the name of the type of cheese it is. It also has two public member methods, which are an accessor and mutator for the cheese type. 3. Add your own new type of food class to the diagram that inherits from Food. Your food must have at least one new member variable or method, which can be anything you want. 4. Add a new class to your diagram called "Recipe". Recipe has two member variables: a list of ingredients (an array of Food items), and the number of minutes it takes to prepare (an integer). The Recipe class also has one member method called makeRecipe(), which takes no parameters and returns a food item. The Recipe class has a standard (bidirectional) relationship with the Food class (think about the multiplicity value for each side of this relationship). Once you have completed the above steps, make a reply showing your completed diagram. The diagram must include the Food, Cheese, and Recipe classes, your own new class, and the relationships between them.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning