answer.
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]
2 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]2 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
The Company management has asked that you compare the OSSTMM and the PTES to determine which methodology to select for internal
Sonbull [250]

Answer:

The basic comaprism of OSSTMN and PTES includes the following: OSSTMN is more theoretical, security assessment methodology, and Metrics based why PTES is technology oriented, penetration testing methodology ,  extended analysis of all stages

Explanation:

Solution

Penetration testing has several methodologies which include :OSSTMM and PTES  

The comparison between OSSTMM and PTES is stated as follows:

OSSTMM:                                                

Security assessment methodology

More Theoretical  

Metrics based

PTES :

Technology oriented

Penetration testing methodology

Extended analysis of all stages

Now,

There are 7 stages which is used to define PTES for penetration testing.(Penetration Testing Execution Standard)

  • Pre-engagement Interactions
  • Intelligence Gathering
  • Threat Modeling
  • Vulnerability Analysis
  • Exploitation
  • Post Exploitation
  • Reporting

Now,

The OSSTMM is used to obtain security metrics and performing penetration testing .The OSSTMM provides transparency to those who have inadequate security policies and configurations.

The OSSTMM includes the entire risk assessment process starting from requirement analysis to report creation.

Six areas are covered by OSSTMM which are:

  • Information security
  • Process security
  • Internet technology security
  • Communications security
  • Wireless security
  • Physical security
7 0
1 year ago
With Voice over Internet Protocol (VoIP), _____. a. voicemails cannot be received on the computer b. call quality is significant
Pachacha [2.7K]

Answer:

c. Users can have calls forwarded from anywhere in the world

Explanation:

As all you need is the internet, there would be no need to try to sort out roaming as you would on a regular phone line

4 0
1 year ago
If parties in a contract are not ____, the contract can be canceled.
Anastasy [175]
Agreed to all the terms mentioned in the contract
5 0
2 years ago
You would like the user of a program to enter a customer’s last name. Write a statement thaUse the variables k, d, and s so that
mojhsa [17]

Answer:

1st question:

Use the variables k, d, and s so that they can read three different values from standard input an integer, a float, and a string respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.

Solution:

In Python:

k = input()  #prompts user to input value of k i.e. integer value

d = input()  #prompts user to input value of d i.e. float value

s = input()  #prompts user to input value of s i.e. a string

print (s, d, k)  #displays these variable values in reverse order

print (k, d, s)#displays these variable values in original order

In C++:

#include <iostream>    // to use input output functions

using namespace std;   //to identify objects like cin cout

int main() {    //start of main function

  int k;   //declare int type variable to store an integer value

  float d; //  declare float type variable to store a float value

  string s;   //  declare string type variable to store an integer value

  cin >> k >> d >> s;    //reads the value of k, d and s

  cout << s << " " << d << " " << k << endl;     //displays these variables values in reverse order

  cout << k << " " << d << " " << s << endl;   } // displays these variable values in original order

Explanation:

2nd question:

You would like the user of a program to enter a customer’s last name. Write a statement that asks user "Last Name:" and assigns input to a string variable called last_name.

Solution:

In Python:

last_name = input("Last Name:")

# input function is used to accept input from user and assign the input value to last_name variable

In C++:

string last_name;  //declares a string type variable named last_name

cout<<"Last Name: ";  // prompts user to enter last name by displaying this message Last Name:

cin>>last_name; // reads and assigns the input value to string variable last_name

The programs alongwith their outputs are attached.

6 0
2 years ago
Given that a method receives three parameters a, b, c, of type double, write some code, to be included as part of the method, th
Debora [2.8K]

Answer and Explanation:

class Dis

{

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

System.out.println("Enter values for a,b,c");

double a=sc.nextDouble();

double b=sc.nextDouble();

double c=sc.nextDouble();

String s=discriminant(a,b,c);

System.out.println(s);

}

public String discriminant(double a, double b, double c)

{

double result;

result=(b^2-4ac);

if(result<0)

return "no real solutions"";

else return "";

}

}

Note:This program is written in JAVA

6 0
1 year ago
Read 2 more answers
Other questions:
  • Represent decimal number 8620 in (a) BCD, (b) excess-3 code, (c)2421 code, and (d) as a binary number
    7·1 answer
  • In which of these places might you be most likely to find a peer-to-peer network? On the Internet In a hospital In a home In a l
    5·2 answers
  • Does the Boolean expression count &gt; 0 and total / count &gt; 0 contain a potential error? If so, what is it?
    8·1 answer
  • Write a function named "list_concat" that takes a list of strings as a parameter and returns the concatenation of all the values
    13·1 answer
  • Match the vocabulary word to the accurate definition. A software program that enables you to search for, interact with, and retr
    5·2 answers
  • Assume you have a variable, budget, that is associated with a positive integer. Assume you have another variable, shopping_list,
    11·1 answer
  • Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
    8·1 answer
  • Performing binary search on an unsorted list will always return the correct answer in O(n) time where n is the length of the lis
    9·1 answer
  • Which of the following statements is true regarding input and output?
    12·2 answers
  • Match the following technologies with their applications.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!