public class Party { public static void main (String args){ System.println(Enter the number of people attending the party:); int…

Question: I keep getting the same result no matter how many times I change my answer. I submitted my code through an autograder and it tells me I’m getting the first 2 of 5 cases right. If I change it slightly, I then either get the last case right or everything wrong. I can’t seem to figure out what the problem is.

PROMPT: Write your code in the file 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).


java Party








RESULT: 378.59

Explanation of example: We need 300 slices of pizza and 200 cans of soda. Since there are 8 slices in a

pie and 72 cans in a case, we need to buy at least 38 pies and 3 cases.

Calculate your essay price
(550 words)

Approximate price: $

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)
Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more