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
Phoenix [80]
3 years ago
8

Host A sends two UDP segments to Server S, one to port 1234 and the other to port 2345. Host B sends one UDP segment to Server S

, port 1234.
a)
The server S needs to open how many server sockets, N, to handle the three segments from Hosts A and B?
N = ?

b)
see attachment

Computers and Technology
1 answer:
SOVA2 [1]3 years ago
8 0

Answer:

A

Explanation:

You might be interested in
How can social media be useful for brand awareness ?
shutvik [7]
It lets them reach out to people on that platform that can advertise their products
4 0
3 years ago
Write a method named circleArea that accepts the radius of a circle as a parameter (as a real number) and returns the area of a
lions [1.4K]

Answer:

  public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

Explanation:

Find the complete program in java that prompts the user to enter a value for radius, stores it in a variable, calls the method circleArea() and passes the value for the radius, then displays the area.

import java.util.Scanner;

public class CocaColaVendingTest {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Please enter the value for radius");

       double r = in.nextDouble();

       //Calling the method circleArea()

       double calcArea = circleArea(r);

       System.out.println("The Area is: "+calcArea);

   }

   public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

}

6 0
3 years ago
A developer has the following class and trigger code:public class InsuranceRates {public static final Decimal smokerCharge = 0.0
deff fn [24]

Answer:

InsuranceRates.smokerCharge

Explanation:

To set the baseCost variable to the value of the class variable smokerCharge, the developer needs to replace

Decimal baseCost = XXX;

with

Decimal baseCost = InsuranceRates.smokerCharge;

This is done using the class reference type.

The smokerCharge should be declared in the InsuranceRates class, at first.

For example Ball b;

And then, a new instance of the object from the class is created, using the new keyword along with the class name: b = new Ball();

In comparing to the example I gave in the previous paragraph, the object reference in the program is:

InsuranceRates rates = new InsuranceRates();

Because the smokerCharge is coming from a different class, it can only be assigned to the variable baseCost via the InsuranceRates class to give:

Decimal baseCost = InsuranceRates.smokerCharge;

4 0
4 years ago
If a file is opened for reading and the file does not exist,what action is taken?
worty [1.4K]

Answer:

C)An error message is issued.

Explanation:

If we try to open a file for reading when that file does not exist, we will get an error message.

For example, in Java we will encounter a FileNotFoundException as in the code below:

       try {

           FileInputStream fis = new FileInputStream("myFile.txt");

           DataInputStream dis = new DataInputStream(fis);

           BufferedReader br = new BufferedReader(new InputStreamReader(dis));

           String str = null;

           while ((str = br.readLine()) != null) {

               System.err.println(str);

           }

       } catch (FileNotFoundException e) {

           e.printStackTrace();

       }

If the file myFile.txt does not exist we can expect to see an exception stack trace corresponding to FileNotFoundException.

8 0
4 years ago
Write a program that lets the user enter a nonnegative integer then uses a loop to calculate the factorial of that number. Displ
ValentinkaMS [17]

Answer:

Following are the program in c++ language

#include <iostream> // header file

using namespace std;// namespace

int main() // main function

{

    int num; // variable declaration

    long int f=1; // variable declaration

   do

   {

       cout<<"Enter the Positive value:";

       cin>>num;

   } while(num<0); // i check whether   number is non negative or not

   while(num>0) // iterating over the loop

   {

       f=f*num; // calculate the factorial

       num--; // decrement the value of num by 1

   }

   cout<<" factorial is :"<<f; // display the factorial .

   return 0;

}

Output:

Enter the Positive value:7

factorial is :5040

Explanation:

Following are the description of the program .

  • Read the input by user in the "num" variable of "int" type..
  • The do-while will check the enter number is nonnegative number.  
  • While(n>0) loop is calculating the factorial in the  "f" variable .
  • Finally display the factorial .  
3 0
3 years ago
Other questions:
  • You can select a paragraph y using the ____key.
    10·1 answer
  • Which combination of factors would result in the lowest monthly mortgage payment?
    9·2 answers
  • What is a help desk
    15·1 answer
  • Google analytics is an example of which of the followinga) search engine
    14·1 answer
  • You find a list of numbers on the kitchen counter, but you aren’t sure what the numbers represent. This is an example of:
    11·2 answers
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • You and your project team have been asked to generate a solution to a problem. The problem is not complicated, and you are sure
    6·1 answer
  • Types of computer that we use in our daily life​
    13·2 answers
  • How much money did Uta initially invest?$180.00$320.00$352.48$471.70
    14·1 answer
  • A computer hacker trying different combinations of characters to crack a password is a ________.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!