Problem

Repeat Projects 1 and 2 of Chapter 12, adding an iterator to the ADT recipe.Project 1A rec...

Repeat Projects 1 and 2 of Chapter 12, adding an iterator to the ADT recipe.

Project 1

A recipe contains a title, a list of ingredients, and a list of directions. An entry in the list of ingredients contains an amount, a unit, and a description. For example, an object that represents 2 cups of flour could be an entry in this list. An entry in the list of directions is a string.

Design an ADT that represents any entry in a list of ingredients, assuming that you have the class MixedNumber, which was described in the online Project 3 of Appendix D. Then design another ADT to represent any recipe. Specify each ADT operation by stating its purpose, by describing its parameters, and by writing preconditions, postconditions, and a pseudocode version of its header. Then write a Java interface for the ADT that includes javadoc-style comments.

Project 2

Define and test a class that implements the interface for the ADT recipe that the previous project describes. Use an instance of ArrayList for each list that you need. Using a text editor, create a text file of recipes for your demonstration program to read.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 15
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT