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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

JAVA:

 

### Instructions for Creating a UML Class Diagram

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:### Instructions for Creating a UML Class Diagram 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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education