Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write your code in the file Party.java. Use the IO module to read inputs and output answers. Suppose that you are responsible for buying pizza

Write your code in the file Party.java. Use the IO module to read inputs and output answers.Suppose that you are responsible for buying pizza and soda for your employer's annual company party. You must buy entire pizza pies and cases of soda (boxes of soda cans). You cannot buy individual slices of pizza or cans of soda, nor can you buy fractional numbers of pizza pies or soda cases.

Ask the user for the following information, in this order:

the number of people attending the party

the number of slices of pizza each person should be able to eat

the number of cans of soda each person should be able to drink

the cost of a pizza pie

the number of slices in a pizza pie

the cost of a case of soda

the number of cans in a case of soda

Compute the total cost of the pizza and soda you will need to buy. Do not buy more than you need to in order to supply each partygoer with the desired number of pizza slices and soda cans.

For this problem only, you may assume that the user will only enter positive numbers (you do not need to check for this).

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions