Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

Project Name: Chpt4_Project

 

Class Name:  Chpt4_Project

 

Write a Java program that accepts the ingredients for a recipe in cups and converts to ounces.

 

Inputs:  The names of three ingredients and the number of cups for each.  The ingredients are milk, flour, and sugar.

Enter the first ingredient:

Enter the second ingredient:

Enter the third ingredient:

Enter the number of cups for the first ingredient:

Enter the number of cups for the second ingredient:

Enter the number of cups for the third ingredient:

 

Outputs: There will be two lines of output:

  1. The names of the ingredients in the following format. The items inside < > are variables.

The recipe uses <ingredient  1>, <ingredient 2>, and <ingredient 3>

  1. The total volume of all three ingredients in ounces in the following format. The item inside < > is a variable.

The total amount of the recipe in ounces is <total ounces>

Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. 

Step 2.  Code the program in Eclipse to read in the ingredients and amount of each, then convert to ounces and calculate total volume.  Use a printf statement to format the amount of ounces to 1 decimal place.  Use this conversion formula to convert cups to ounces.

1 US cup = 8 US ounces

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