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
sukhopar [10]
2 years ago
10

Print "userNum1 is negative." if userNum1 is less than O. End with newline Convert userNum2 to 0 if userNum2 is greater than 8.

Otherwise, print "userNum2 is less than or equal to 8.. End with newline. 1 public class UserNums 2public static void main (String args) int userNum1; int userNum2 userNumt - -1; userNum2 7; Your solution goes here / 10 System.out.printin("userNum2 is "userNum2);
Computers and Technology
1 answer:
Butoxors [25]2 years ago
8 0

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter User name 1 and 2");

       int userNum1 = in.nextInt();

       int userNum2= in.nextInt();

       if(userNum1<0){

           System.out.println("userNum1 is negative.");

       }

       else if(userNum2>8){

           userNum2 =0;

       }

       else{

           System.out.println("userNum2 is less than or equal to 8..");

       }

   }

}

Explanation:

This is implemented in Java programming language

Using the scanner class, the user is prompted to enter two numbers

These are saved in the variable userNum1 and userNum2 respectively.

If, else if and else statements are then used according to the specifications given in the question.

You might be interested in
Sarah works in a coffee house where she is responsible for keying in customer orders. A customer orders snacks and coffee, but l
Maru [420]

Answer:

Stack

Explanation:

Stack is a linear data structure that follows a particular order in the way an operation is done or sequence a job is completed.

It uses either LIFO ( Last In, First Out) which is also known as first come first served sequence or FILO (First In, Last Out) sequence.

There are several real life examples of which we can use the example of replacing the snack items Sarah brought for the customer.

If Sarah used the LIFO method, it means she replaced the snack items first ontop of the already existing snack items that's why there is a mismatch.

5 0
1 year ago
Read 2 more answers
What is illustrated in the cells to the right of the Fourth Quarter column?
beks73 [17]
Photosynthesis is illustrated in the cells to the right of the fourth column
5 0
2 years ago
Read 2 more answers
The UML models operations by listing the operation name preceded by an access modifier. A(n) ________ indicates a public operati
Nastasia [14]

Answer / Explanation

The question seem not to be complete. It can be found in search engines.

Kindly find the complete question below.

Question

The UML models operations by listing the operation name followed by a set of ____. A plus sign (+) in front of the operation name indicates that the operation is a public one in the UML (i.e., a public method in Java).

Answer:

To properly answer this question, let us first define what a UML is:

UML can be defined as or is simply refereed to as Unified Modelling Language. It is considered as the standard for modeling language that enables designers and developers to specify, visualize, construct and document object or programs made by them in the areas of software systems, Thus, UML makes this objects developed by computer gurus secure and robust in execution.

If we now go back to the question asked while referencing the explanation given of what a UML is, the answer to the question is

parentheses.

However, if the original question being asked is valid, the answer to it would be : sign (+) in front of the operation name

5 0
2 years ago
Read 2 more answers
A company has deployed four 48-port access layer switches to a switch block. For redundancy each access layer switch will connec
NISA [10]

Answer:

The answer is "176".

Explanation:

In the given question there is a total of 192 switch ports, which are available for the 48-port switches. And for four access points, 8 trunk links that are 2 per access layer switch will be required. In every connexion of the trunk include two significantly modified-ports on the circuits throughout the access layer. With trunk connexions to both the communication network controller switches, a total of 17 switcher ports is required, allowing 176 access points for end system connectors.

3 0
2 years ago
Assume that success is a variable of type boolean that has been declared. Assume that processor refers to an object that provide
Iteru [2.4K]
Try {
AutoFactory.shutdown();
} catch (ProductionInProgressException e) {
AutoFactory.reset();
}
6 0
2 years ago
Other questions:
  • When a switch configuration includes a user-defined error threshold on a per-port basis, to which switching method will the swit
    13·1 answer
  • How efficient would a 6-bit code be in asynchronous transmission if it had 1 parity bit, 1 start bit, and 2 stop bits?
    5·1 answer
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • In your own words, what is pair-programming? What is the role of the driver? What is the role of the navigator? What are some be
    15·1 answer
  • Given an integer variable strawsOnCamel, write a statement that uses the auto-increment operator to increase the value of that v
    12·1 answer
  • If you are viewing a webpage with customized or regenerated content, such as updated stock quotes, what type of webpage are you
    5·1 answer
  • 1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
    12·1 answer
  • Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off. The follow
    7·1 answer
  • array of String objects, words, has been properly declared and initialized. Each element of words contains a String consisting o
    11·1 answer
  • An online retailer is looking to implement an enterprise platform. Which component of the enterprise platform will help the comp
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!