Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can someone help write this in java Loops Assignment Outcomes By completing this assignment, students will be able to: 1) Design programs that leverage loops

can someone help write this in java image text in transcribed
Loops Assignment Outcomes By completing this assignment, students will be able to: 1) Design programs that leverage loops to solve problems 2) Apply concepts from earlier in the semester, including conditional statements 3) Generate and use random numbers 4) Solve problems of increasing complexity NOTE: Assignment 4 should utilize only the following topics: Variables, Assignment, Input/Output, Selection Structures and repetition structures (.e. loops). Program 1: Hungry? In the United States, we tend to be obsessed with eating large animals. We have sayings of "I'm so hungry, I could eat a horse and ask meaningful questions like "How do you eat an elephant? One bite at a time!" For this assignment, you're going to put things in perspective. You will ask the user how many pounds the object they will be eating weighs, then calculate both how many bites it takes to eat the object and how long it takes total to eat it. Assume that each bite reduces the object you are eating by 0.05 pounds (lbs). Design (pseudocode) and implement (source code) for this program. BTW, an African Bush elephant can weight 13,000 lbs. How many bites would that be? Sample run 1: What type of thing are you eating? cheese How much does it weigh (in lbs)? 1 You take bite #1 of the cheese that now weighs 0.95 lbs You take bite #2 of the cheese that now weighs 0.9 lbs You take bite #3 of the cheese that now weighs 0.84999996 lbs You take bite #4 of the cheese that now weighs 0.79999995 lbs You take bite #5 of the cheese that now weighs 0.74999994 lbs You take bite #6 of the cheese that now weighs 0.6999999 lbs You take bite #7 of the cheese that now weighs 0.6499999 lbs You take bite #8 of the cheese that now weighs 0.5999999 lbs You take bite #9 of the cheese that now weighs 0.5499999 lbs You take bite #10 of the cheese that now weighs 0.49999988 lbs You take bite #11 of the cheese that now weighs 0.44999987 lbs You take bite #12 of the cheese that now weighs 0.39999986 lbs You take bite #13 of the cheese that now weighs 0.34999985 lbs You take bite #14 of the cheese that now weighs 0.29999983 lbs You take bite #15 of the cheese that now weighs 0.24999984 lbs You take bite #16 of the cheese that now weighs 0.19999984 lbs You take bite #17 of the cheese that now weighs 0.14 999984 lbs You take bite #18 of the cheese that now weighs 0.099999845 lbs You take bite #19 of the cheese that now weighs 0.049999844 lbs

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

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

Students also viewed these Databases questions