Obesity in America is increasing at an alarming rate. Check the map from the Centers for Disease

Question:

Obesity in America is increasing at an alarming rate. Check the map from the Centers for Disease Control and Prevention (CDC) at http://www.cdc.gov/obesity/data/adult.html, which shows obesity trends in the United States over the last 20 years. As obesity increases, so do occurrences of related problems (e.g., heart disease, high blood pressure, high cholesterol, type 2 diabetes). Write a program that helps users choose healthier ingredients when cooking, and helps those allergic to certain foods (e.g., nuts, gluten) find substitutes.

The program should read a recipe from the user and suggest healthier replacements for some of the ingredients. For simplicity, your program should assume the recipe has no abbreviations for measures such as teaspoons, cups, and tablespoons, and uses numerical digits for quantities (e.g., 1 egg, 2 cups) rather than spelling them out (one egg, two cups). Some common substitutions are shown in Fig. 14.27. Your program should display a warning such as, “Always consult your physician before making significant changes to your diet.”

Fig. 14.27

Ingredient 1 cup sour cream 1 cup milk 1 teaspoon lemon juice 1 cup sugar 1 cup butter 1 cup flour 1 cup

Your program should take into consideration that replacements are not always one-for-one. For example, if a cake recipe calls for three eggs, it might reasonably use six egg whites instead. Conversion data for measurements and substitutes can be obtained at websites such as:

http://chinesefood.about.com/od/recipeconversionfaqs/f/usmetricrecipes.htm http://www.pioneerthinking.com/eggsub.html http://www.gourmetsleuth.com/conversions.htm 

Your program should consider the user’s health concerns, such as high cholesterol, high blood pressure, weight loss, gluten allergy, and so on. For high cholesterol, the program should suggest substitutes for eggs and dairy products; if the user wishes to lose weight, low-calorie substitutes for ingredients such as sugar should be suggested.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: