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: The names of the ingredients in the following format. The items inside < > are variables. The recipe uses , , and 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 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

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

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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
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
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