Answer:
import java.util.Scanner;
public class CocaColaVendingTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter the total number of calls received");
int callsReceived = input.nextInt();
System.out.println("Enter the total number of operators");
int operatorsOnCall = input.nextInt();
int callsPerOperator = callsReceived/operatorsOnCall;
System.out.println("The number of calls per operator is "+callsPerOperator);
}
}
Explanation:
A complete Java code is given above. The user is prompted to enter the values for the number of calls received and the number of operators. These are stored in the respective variables.
Using an Integer division, the number of calls per operator is obtained by: callsPerOperator = callsReceived/operatorsOnCall;