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
iVinArrow [24]
3 years ago
11

printLarger is a method that accepts two int arguments and returns no value. Two int variables, sales1 and sales2, have already

been declared and initialized. Write a statement that calls printLarger, passing it sales1 and sales2. Assume that printLarger is defined in the same class that calls it.
Computers and Technology
1 answer:
gizmo_the_mogwai [7]3 years ago
6 0

Answer:

<em>public static void printLarger(double sales1, double sales2){</em>

<em>        if (sales1>sales2){</em>

<em>            System.out.println(sales1+" is larger");</em>

<em>        }</em>

<em>        else {</em>

<em>            System.out.println(sales2+" is larger");</em>

<em>        }</em>

<em>    }</em>

<em>A complete code calling the printLarger method is given below</em>

Explanation:

<em>public class Larger{</em>

<em>    public static void main(String[] args) {</em>

<em>        int sales1 = 100;</em>

<em>        int sales2 = 120;</em>

<em>        printLarger(sales1,sales2);</em>

<em>    }</em>

<em>public static void printLarger(int sales1, int sales2){</em>

<em>        if (sales1>sales2){</em>

<em>            System.out.println(sales1+" is larger");</em>

<em>        }</em>

<em>        else {</em>

<em>            System.out.println(sales2+" is larger");</em>

<em>        }</em>

<em>    }</em>

}

You might be interested in
In which section of a document would you include image acknowledgments for the images used ?
NemiM [27]
The answer is credits :)
3 0
3 years ago
Read 2 more answers
Cooper, the owner of a small bicycle manufacturing company, is striving to keep his organization running smoothly while remainin
Leona [35]

Answer:

Reducing Cost

Explanation:

From the question, it is said that Cooper owns a small bicycle manufacturing company and hence enhancing services will increase cost and make him struggle with profit in an environment already challenging. Creating new products or differentiating products are also not solutions to this problem, as they will incur more spend from the company. However, reducing costs is the only process implementation strategy that would help in a competitive environment, as profit maximization is ensured.

4 0
3 years ago
What program command saves a copy of a file under a different name
svlad2 [7]

Answer:

It differs from the regular Save command, which stores the data back to the file and folder it originally came from. "Save As" lets the user make a copy of the file in a different folder or make a copy with a different name.

Explanation: plz mark brainlist

7 0
2 years ago
Implement the function fileSum. fileSum is passed in a name of a file. This function should open the file, sum all of the intege
aliina [53]

Answer:

The C++ code is given below with appropriate comments for better understanding

Explanation:

/*C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program */

//header files

#include <fstream>

#include<string>

#include <iostream>

#include <cstdlib> //needed for exit function

using namespace std;

//function prototype

int fileSum(string filename);

int main()

{

  string filename;

  cout << "Enter the name of the input file: ";

  cin >> filename;

  cout << "Sum: " << fileSum(filename) << endl;

  system("pause");

  return 0;

}

/*The function fileSum that takes the string filename and

count the sum of the values and returns the sum of the values*/

int fileSum(string filename)

{

  //Create a ifstream object

  ifstream fin;

  //Open a file

  fin.open(filename);

  //Initialize sum to zero

  int sum=0;

 

  //Check if file exist

  if(!fin)

  {

      cout<<"File does not exist ."<<endl;

      system("pause");

      exit(1);

  }

  else

  {

      int value;

      //read file until end of file exist

      while(fin>>value)

      {

          sum+=value;

      }

  }

  return sum;

}//end of the fileSum

7 0
3 years ago
If you're found to be at fault in _____, you'll be required to attend a Traffic Collision Avoidance Course. A. One crash in the
OleMash [197]

Answer:

C. Two crashes in two years

Explanation:

Violation of the traffic laws and rules results in filing the charges against the violator. The violator is required to visit the court and provide an explanation to whatever had happened. It depends on the verdict of the court to declare about the penalty. In the situation where there is an injury resulting in the admission of the injured person to the hospital, then the offender is ordered to attend a Traffic Collision Avoidance Course. The second situation is repetition of the collision in a time span of two years.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Users of an extranet can access a company or organization's entire intranet.
    12·2 answers
  • In addition to the ping command, what other command is useful in displaying network delay and breaks in the path to the destinat
    5·2 answers
  • Which letters appear in the home row on a keyboard?
    11·1 answer
  • A keyboard is a/an _____. interconnector port packet NAS
    7·1 answer
  • If you flash UEFI and now your computer is no longer working, is there anything you can do to correct the situation?
    5·1 answer
  • Consider the following class declaration: public class Square { private double sideLength; public double getArea() { return side
    13·1 answer
  • A company is developing a smart TV that connects to a wireless home network. Which technology can best help to establish this co
    11·2 answers
  • Explain the differences between copyright, fair use, and trademark?
    13·1 answer
  • 1. an image can be stored either in a vector graphic file or in a bitmap file true or false
    12·1 answer
  • The next step in the translation of this mrna will be the formation of a peptide bond between which two of the numbered amino ac
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!