Please code in java and follow the instructions as it is please.. Dont use very advanced methods. refer the images attached The new manager of a craft beer pub. On your first day, the ATF demands an audit of your beer inventory in dollar amounts. The problem is that you’re on-tap kegs are only partially filled. You must determine the current retail worth of a tapped keg, based on the percentage of beer remaining, and the price of the beer per pour. Facts: A full-sized keg is 15.5 gallons. There are 128 ounces in 1 gallon. Beer is served in a pint glass  There are 16 ounces in 1 pint. Input Your solution must take in two inputs. The first input represents the percentage of beer remaining in the keg represented as a decimal ratio, with valid ranges from 0.0 (empty) to 1.0 (full). The second input represents the price of the beer per serving, as dollars and cents. Output The output should display the following text: "There is $ of beer left in keg" where is the numerical value of how much is left.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please code in java and follow the instructions as it is please.. Dont use very advanced methods.

refer the images attached

The new manager of a craft beer pub. On your first day, the ATF demands an audit of
your beer inventory in dollar amounts. The problem is that you’re on-tap kegs are only partially
filled. You must determine the current retail worth of a tapped keg, based on the percentage of
beer remaining, and the price of the beer per pour.
Facts:
A full-sized keg is 15.5 gallons.
There are 128 ounces in 1 gallon.
Beer is served in a pint glass
 There are 16 ounces in 1 pint.
Input
Your solution must take in two inputs. The first input represents the percentage of beer
remaining in the keg represented as a decimal ratio, with valid ranges from 0.0 (empty) to 1.0
(full). The second input represents the price of the beer per serving, as dollars and cents.
Output
The output should display the following text: "There is $<dollars> of beer left in keg" where
<dollars> is the numerical value of how much is left.

Sample Input
0.5 4
1.0 6
08
Sample output
There is $248.00 of beer left in keg
There is $744.00 of beer left in keg
There is $0.00 of beer left in keg
Transcribed Image Text:Sample Input 0.5 4 1.0 6 08 Sample output There is $248.00 of beer left in keg There is $744.00 of beer left in keg There is $0.00 of beer left in keg
input/scanner
output/print
storage/variable
P1 Solutions limited in scope to:
• arithmetic
modulus
logical
relational
equality
casting
Transcribed Image Text:input/scanner output/print storage/variable P1 Solutions limited in scope to: • arithmetic modulus logical relational equality casting
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY