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
marta [7]
4 years ago
11

add is a method that accepts two int arguments and returns their sum. Two int variables, euroSales and asiaSales, have already b

een declared and initialized. Another int variable, eurasiaSales, has already been declared. Write a statement that calls add to compute the sum of euroSales and asiaSales and that stores this value in eurasiaSales. Assume that add is defined in the same class that calls it.
Computers and Technology
1 answer:
Oduvanchick [21]4 years ago
8 0

Answer:

// here is code in Java.

// package

import java.util.*;

// class definition

class Main

{

   // method that return sum of two sale value

   public static int Add(int euroSales,int asiaSales)

   {

       // return the sum

       return euroSales+asiaSales;

   }

   //main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // variables

       int euroSales=100;

       int asiaSales=150;

       int eurasiaSales;

        // call the function

       eurasiaSales=Add(euroSales,asiaSales);

        // print the sum

       System.out.println("total sale is:"+eurasiaSales);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.

Output:

total sale is:250  

You might be interested in
When you move a paragraph in a document that includes text with a footnote, what happens to the footnote reference?
kumpel [21]

How it is supposed to work is that provided the footnotes were inserted correctly using the Reference tab and then click on insert footnote, then these notes will also be moved with the text. As long as the selection includes the footnote reference in the text, moving the text will also move notes as well.

3 0
3 years ago
Read 2 more answers
Anyone free to inbox me plz....​
MArishka [77]

Answer:

To message you? Here is my alt number (240-918-2355) you can text me if you want ¯\_(ツ)_/¯

8 0
3 years ago
Read 2 more answers
If an ARQ algorithm is running over a 40-km point-to-point fiber optic link then:
Dennis_Churaev [7]

Answer and Explanation:

Given data:

Distance (D) = 40 KM

Speed of light in the fiber =Distance/ speed of light in the fiber

a) Delay (P) = Distance/ speed of light in the fiber

= (40,000 Meters/2×108 m/s)

=( 40×103 Meters/2×108 m/s)

Propagation delay (P) = 0.0002 seconds or 200 microseconds

b)

if propagation delay is 0.0002 Seconds roundup trip time (RTT) will be 0.0004 Seconds or 400 micro Seconds

Essentially since transmission times and returning ACKs are insignificant all we really need is a value slightly greater than 0.0004 seconds for our timeout value.

c)

The obvious reasons would be if the data frame was lost, or if the ACK was lost. Other possibilities include extremely slow processing on the receive side (late ACK).

Or Extremely Slow Processing of the ACK after it is received back at the send side.

4 0
3 years ago
Mario is designing a page layout for a sports magazine, and he decides to add the image of a cyclist. Which principle of page la
tamaranim1 [39]

The  principle of page layout is Mario using significantly in this image is emphasis.

<h3>What is page layout use for?</h3>

Page layout is known to be a tool that is often used to make a documents to have a more custom look, such as newsletters, books, and others.

Note that The  principle of page layout is Mario using significantly in this image is emphasis because he wants all to know the kind of sport in question.

Learn more about page layout from

brainly.com/question/2501083

#SPJ1

7 0
2 years ago
What is an Algorithm? (might not be in the chapter text). Give an example.
Rashid [163]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

An algorithm is the list of a finite set of instructions and rules that a computer needs to do to complete a task in order to solve a problem.

In short, an algorithm is a series of instructions that are implemented step by step to solve a problem. For example, you could consider a pizza recipe an algorithm for making a pizza in an everyday life routine. But when you are talking about using algorithms in computation and in mathematics. It means that solving a problem using a series of steps step by step.

For example, your everyday tasks aligned on a google calendar and remind you about your tasks using the alarm, etc- how to implement this using set of instructions and rules- is an algorithm.

Solving a quadratic equation is another example of an algorithm.

Binary search, array sorting are an example of an algorithm in computation. Because these algorithms based on the execution of step-by-step instruction to solve a problem such as sorting a list of numbers etc.  

6 0
3 years ago
Other questions:
  • Why is driving a privilege?
    15·2 answers
  • Which of the following is the main consideration when choosing an appropriate outlet box?
    7·2 answers
  • What was the major sign that lead Professor Shiller to predict the crash of the housing market​
    6·1 answer
  • Suppose we are performing a binary search on a sorted array called numbers initialized as follows: // index 0 1 2 3 4 5 6 7 8 9
    9·1 answer
  • Translate the following C++ program to MIPS assembly program. *Please explain each instruction of your code by a comment and sub
    5·1 answer
  • Write a class named Accumulator containing: An instance variable named sum of type integer. A constructor that accepts an intege
    14·1 answer
  • Lets say if my computer shut down every 10 minutes. What can you do to solve the problem. Hint: Use these word in you answer: ha
    10·2 answers
  • (20points)
    6·1 answer
  • Who elso does their online school in their bed cause i do
    7·2 answers
  • How can i find these services
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!