Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

03. Java Beer Assignment2 1T Insert Table Chart Text Shape Media Comment View Zoom Add Page Collaborate Format Document Java Beer Assignment Outcome: *Student will

image text in transcribed

03. Java Beer Assignment2 1T Insert Table Chart Text Shape Media Comment View Zoom Add Page Collaborate Format Document Java Beer Assignment Outcome: *Student will demonstrate the ability to write and run a simple program Student will demonstrate the ability to do math *Student will demonstrate the ability to IO from user Program Specifications: Citation All the factoids about beer and exercise given in this assignment are paraphrased from realbeer.com Studies have shown that, on average, someone who consumes a single 12-ounce can of beer every day without compensating for the calorie intake through diet modifications or extra exercise, will gain approximately 15 pounds in one year. You can assume this ratio of beer-to weight-gain is constant. (For example, doubling the beer consumption to two 12 ounce cans per day will lead to 30 pounds of extra weight in one year.) You will have to ask the user how many beers he or she expects to consume each day, on average, as well as the average amount of money he or she spends on a single 12-ounce can of beer. Using this information, your goal is to write a program to determine the following: Nothing selected Select an object or text to format. 1. How many beers will the user consume over the course of the year? 2. Assuming a beer is 150 calories, how many calories will the user take in from beer 3. 4. alone over the course of the year? How much weight can the user expect to gain in one year based on the number of 12 ounce beers they consume every day? How much the user will spend on beer this year? All output should be displayed using 2 digits of precision after the decimal point! You may assume that there are 365 days in a year (ignoring leap years). 1. The number of 12-ounce beers consumed each day will be a non-negative real number. 2. How much the user spends on a single beer, on average, will be a positive real number Some people like cheap beer, while others pay a bit more for their favorite brand.) Here is one sample output of running the program. Note that this test is NOT a comprehensive test. You should test your program with different data than is shown here based on the specifications given. The user input is given in italics while the program output is in bold

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. Describe how technology can impact intercultural interaction.

Answered: 1 week ago

Question

7. Define cultural space.

Answered: 1 week ago