Answered You can hire a professional tutor to get the answer.
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 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).
Example:
java Party
100
3
2
7.99
8
24.99
72
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.