I’m studying for my Java class and don’t understand how to answer this. Can you help me study?

El Centro’s Floor 5 has X number of classrooms that each have a maximum number of 20 students per classroom.

Write a Java program to do the following:

  1. Create a constant for the maximum student count per class and assign 20 to it.
  2. Create an integer variable to store the total number of enrolled students.
  3. Create a prompt for the variable in step 2.
  4. Calculate the number of full class rooms that are needed to support this number.
  5. Calculate the number of remaining students who do not make up a full class room. (Use the Modulus operator)
  6. Display the number of students enrolled, the number of full classrooms and the number of remaining students

Grading Notes:

Use descriptive variable names with the standard naming convention.

Below is a sample of the expected output.

Enter the number of students enrolled: 46

The class has 46 students enrolled. This requires 2 full classrooms with 6 students remaining.

 

“Looking for a Similar Assignment? Order now and Get a Discount!