1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OLga [1]
3 years ago
13

Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values

into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do). HOWEVER: if any value read in is not valid input, just print the message "INVALID".
Computers and Technology
1 answer:
erik [133]3 years ago
3 0

Answer:

The code to this question can be given as:

Code:

int callsReceived,operatorsOnCall;    //define variable  as integer

Scanner ob= new Scanner(System.in);    

//create object of scanner class for user input

System.out.println("Insert the value of callsReceived");  //print message.

callsReceived = ob.nextInt();    //input value.

System.out.println("Insert the value of operatorsOnCall"); //print message.  

operatorsOnCall = ob.nextInt();    //input value.

if (operatorsOnCall == 0)  //check number  

{

System.out.println("INVALID");   //print message.

}

else

{

System.out.println(callsReceived/operatorsOnCall);   //print value.

}

Explanation:

In the above code firstly we define 2 integer variable that name is already given in the question. Then we create the scanner class object for taking user input. Then we print the message for input first and second value from the user. then we use conditional statement. If the second variable that is  operatorsOnCall is equal to 0. So It print INVALID. else it divide the value and print it.

You might be interested in
Three business partners are forming a company whose name will be of the form "name1, name2 and name3". however, they can't agree
V125BC [204]

ANSWER: Here 3 print line statements are needed. So, the best code would be

import java.util.Scanner;

public class business {

public static void main(String args[]){

Scanner stdin = new Scanner(System.in);

String Larry = stdin.nextLine();

String Curly = stdin.nextLine();

String Moe = stdin.nextLine();

System.out.println(Larry +"\t" + Curly + "\t" + Moe);

System.out.println(Larry + "\t" + Moe + "\t" + Curly);

System.out.println(Curly + "\t" + Larry + "\t" + Moe);

System.out.println(Curly + "\t" + Moe + "\t" + Larry);

System.out.println(Moe + "\t" + Larry + "\t" + Curly);

System.out.println(Moe + "\t" + Curly + "\t" + Larry);

}

}

5 0
3 years ago
When creating databases, the different pieces of information are input into _______.
Tanya [424]
Fields. This one had me in doubt. Different kinds of information go into different database tables. A table contains rows (=records) made up of fields. So a field is the smallest "thing" in a database (much like a cell in a spreadsheet). So yes, I'd say fields is the correct answer.
4 0
3 years ago
Which protocol is often used in conjunction with ipsec to provide a remote access client vpn with user authentication?
amid [387]

The L2TP or Layer 2 Tunneling Protocol is often used in conjunction with ipsec to provide a remote access client vpn with user authentication.

<h3>What is vpn?</h3>

VPN is known as a Virtual Private Network extends a private network across a public network and activates users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.

The main difference between VPN proxy and a VPN is encryption and VPNs hides all the web activities performed by the user as well as user's private IP address.

Therefore, the L2TP or Layer 2 Tunneling Protocol is often used in conjunction with ipsec to provide a remote access client vpn with user authentication.

Learn more about VPN here:

brainly.com/question/17272592

#SPJ4

3 0
2 years ago
Select the correct navigational path to sort data using multiple levels.
gavmur [86]

Answer:

Data, Sort and Filter, Sort.

Explanation:

Just did the test.

5 0
3 years ago
Read 2 more answers
Method: public ArrayList diff(ArrayList list1, ArrayList list2) {} diff() method accepts two ArrayLists of Integer and returns t
babymother [125]

Answer:

(Assuming Java)

public ArrayList diff(ArrayList list1, ArrayList list2) {

   ArrayList<Integer> union = new ArrayList<>();

   for (int element : list1) {

       union.add(element);

   }

   for (int element : list2){

       if (!union.contains(element)) {

           union.add(element);

       }

   }

   return union;

}

Explanation:

Create an ArrayList that has the union of list1 and list2.

First for loop copies all elements into the union array list.

Second for loop adds all elements that are not yet in the union arraylist to the union arraylist.

(Keep in mind that I assume that you mean a mathematical union, so no duplicates. If this is not what you mean, remove the if statement in the second for loop)

5 0
3 years ago
Other questions:
  • Qazwsxedcrfvtgbyhnujmikolp. In which direction on the keyboard did I type in?
    14·2 answers
  • What is built on integrated circuits and carries the electrical current? CPUs Data Software Transistors
    5·1 answer
  • Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
    11·1 answer
  • What can your employer do to protect you from overhead power lines?
    13·1 answer
  • You are using a PowerPoint template from your school to present your research findings in front of the class. What would you do,
    13·2 answers
  • A section in a history book describing the conditions and causes of the Great Depression in the Midwest in the 1930s. a. Enterta
    15·1 answer
  • When an instruction is sent to the CPU in a binary pattern, how does the CPU know what instruction the pattern means
    7·1 answer
  • While some audio recording programs are expensive, there are more user friendly,
    10·1 answer
  • What is e banking effects
    7·1 answer
  • All of the salespeople in hyperactive media sales use laptops, so that they can take their applications and data on the road to
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!