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
4vir4ik [10]
2 years ago
12

Consider the following class:

Computers and Technology
1 answer:
Pachacha [2.7K]2 years ago
3 0

Answer:

c.return Integer.compare(value, otherTemp.value)

Explanation:

The compare() method as the name implies compares two integer values. If they are equal it returns 0, if the first number is smaller it returns -1, and if the first number is greater it returns 1.

It is an Integer class method that is why you need to type Integer.compare() to call the function.

For this example, the parameters that will be compared are <em>value</em>, and <em>otherTemp.value. </em>The type of compareTo method is an integer, we need to return the result.

You might be interested in
He made me so angry when he didn’t let me make my point that I had to stalk after him.
madam [21]

Answer:

21

Explanation:

because

4 0
3 years ago
Read 2 more answers
How to enhance the video to full screen in filmora
Anastaziya [24]

Answer:

The answer to your question is to click on the button with the square on the window options ribbon.

6 0
2 years ago
Sandy's keyboard is not inputting data into her computer which key should she press to verify it is connected to her computer...
Ksivusya [100]

Answer:

Windows key,capslock key for verify connectivity

Explanation:

Sandy's can verify whether her keyboard is working or not by pressing the windows key. Caps Lock and Num lock key will turn on the light on keyboard and she shall see whether her keyboard is functioning or not. This method is being used everywhere to verify the keyboard connectivity.The light function can also be checked by using Caps Lock or Num lock key as well. Some keyboard offers the in built light, which can be turned on by pressing Alt+Space bar.

5 0
3 years ago
Explain why there is an overlap of skills and qualities in design professions​
strojnjashka [21]

The design process is the same in all creative occupations, thus, similar skills and qualities are required. The work of an architect, Craftperson, Fine Artist, or an Interior designer is to design. Whether one occupation designs clothing and associated fashions or another one designs interiors of building, they all design. Most people who work as designers possess similar personal qualities like creativity, better communication skills, and high skill set.

6 0
3 years ago
Write a function called factor that determines for a pair of integers whether the second integer is a factor of the first. The f
Aleks04 [339]
<h2>Answer:</h2>

//import the Scanner class to allow for user's input

import java.util.Scanner;

//Declare the class and call it FactorClass

public class FactorClass {

   

   //Declare the function factor

   //It returns either true or false, therefore the return type is boolean

   //It receives two arguments - a and b

   public static boolean factor(int a, int b){

       

       //Check if a is divisible by b.

       //Return true if yes

       if(a % b == 0){

           return true;

       }

       

       //return false if a is not divisible by b

       return false;

   

   }  // End of method factor

   

   

   //The main method to test the function factor()

   public static void main(String[] args) {

       

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Prompt the user to enter the pair of numbers

       System.out.println("Enter the pair of numbers (separated by a space)");

       

       //grab and store the first number in a variable

       int firstnum = input.nextInt();

       

       //grab and store the second number in another variable

       int secondnum = input.nextInt();

       

       

       //With the variables, call the factor() method

       //If it returns true, print the adequate message

       if(factor(firstnum, secondnum)){

           System.out.println(secondnum + " is a factor of " + firstnum);

       }

       

       //If it returns false, print the adequate message

       else{

           System.out.println(secondnum + " is NOT a factor of " + firstnum);

       }

   

 }            // End of main method

   

}    // End of class declaration

==============================================================

<h2>Sample Output 1:</h2>

>> Enter the pair of numbers  separated by a space

8 4

>> 4 is a factor of 8

==============================================================

<h2>Sample Output 2:</h2>

>> Enter the pair of numbers  separated by a space

9 4

>> 4 is NOT a factor of 9

==============================================================

<h2>Explanation:</h2>

The above code has been written in Java and it contains comments explaining every segment of the code. Kindly go through the comments for better understanding of the code.

For simplicity, the code is re-written as follows with little or no comments;

import java.util.Scanner;

//Declare the class and call it FactorClass

public class FactorClass {

   

   public static boolean factor(int a, int b) {

       if(a % b == 0){

           return true;

       }

       

       //return false if a is not divisible by b

       return false;

   

   }  // End of method factor

   

   

   //The main method to test the function factor()

   public static void main(String[] args) {

       

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Prompt the user to enter the pair of numbers

       System.out.println("Enter the pair of numbers (separated by a space)");

       

       //grab and store the first number in a variable

       int firstnum = input.nextInt();

       

       //grab and store the second number in another variable

       int secondnum = input.nextInt();

       

       

       if(factor(firstnum, secondnum)){

           System.out.println(secondnum + " is a factor of " + firstnum);

       }

       

       else{

           System.out.println(secondnum + " is NOT a factor of " + firstnum);

       }

    }

   

}

3 0
3 years ago
Other questions:
  • Judy forgot where she saved a certain file on her computer. Therefor, she searches for all files with a jpg file extension. Whic
    11·2 answers
  • How does the occupational outlook affect the monetary benefits of a career
    11·1 answer
  • How to upgrade from office home to office professional
    13·1 answer
  • Please help with the question no. 5 and 7 please help ​
    6·1 answer
  • Is the following statement TRUE or FALSE?
    9·1 answer
  • PLEASE HELP! I'm offering brainliest!
    6·1 answer
  • hey guys just dropped some hot beats so go and follow me my user is the beats and comment if you would do that that would be gra
    11·1 answer
  • Please hurry
    15·2 answers
  • Suggest three ways in which celebrating an occasion influences food choices?
    10·2 answers
  • The following Python statement instructs the program to open a file for input.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!