Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 3 Part A (50 Points) This is variation of a problem in the book. For this problem the main purpose is to use a

image text in transcribed

Lab 3 Part A (50 Points) This is variation of a problem in the book. For this problem the main purpose is to use a cast to handle integer division. Prompt the user for the number of bunnies launched and the points they earned The bunnies launched and points earned have to be defined as int. Calculate the points per bunny as a double (you will need to use a cast). Display back to the user their inputs and the calculated value (See sample runs). for this part you can use something other than bunnies and points as long as you are using ints for the two numbers and a double for the average using a cast for the division. You can use Scanner or dialog boxes for the input but Scanner is shown Use a print to display the points per bunny with 1 decimal place Sample Run How many bunnies were launched? 113 How many points, were earned? 1750 tencered by user ensered by user 1,750 points for 113 bunnies = 15.5 points/bunny Another Sample Run How many bunnies were launched? 3 How many points were earned? 100 eentered by user Centered by user 100 Points for 3 punnies = 33.3 points/bunny

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_2

Step: 3

blur-text-image_3

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

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions

Question

What were your most important educational experiences?

Answered: 1 week ago