Write a java program which compiles and


have to complete the following WITHOUT using loops and arrays: Write a Java program which compiles and executes: ask the user for 4 integer values. Each one of these is a percent of a total cake (4 values must total 100) verify that the 4 integers of Step 1 add up to 100 (i.e: 4 values total 100%, full cake- nothing more or less) If they DO NOT add up to 100, print an error message of some form and exit the program (Hint: in main () the return; statement will cause the program to exit) Identify which slice of cake each person too assuming everyone is greedy and takes the largest slice available (person 1 will take the highest value, person 2 the second highest value etc.) THERE ARE 4 PEOPLE IN TOTAL - 1 slice/person The program should look like this: Please enter sizes of the four slices: 20 30 24 26 Person 1 took slice 2 (30%) Person 2 took slice 4 (26%) Person 3 took slice 3 (24%) Person 4 took slice 1 (20%) I use NX Client and the class name will be cake

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a java program which compiles and
Reference No:- TGS0571780

Expected delivery within 24 Hours