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
Karolina [17]
2 years ago
6

Complete the expression so that userPoints is assigned with 0 if userStreak is greater than 25 (second branch). Otherwise, userP

oints is assigned with 10 (first branch).
import java.util.Scanner;

public class EqualityAndRelational {
public static void main (String args) args) {
int userBonus;
int userPoints;

userPoints = 0;

Scanner scnrnew Scanner(System.in);
userBonus = scnr.nextInt();

if (/* Your Solution goes here*/) {
userPoints = 10;
}
else {
userPoints = 0;
}

Computers and Technology
2 answers:
velikii [3]2 years ago
6 0

Answer:

if (userStreak <= 25) {

Explanation:

I modified the answer to fit with your question, but here's a snapshot of the code.

Nata [24]2 years ago
3 0

Answer:

Explanation:

Modified code:

import java.util.Scanner;

public class EqualityAndRelational {

   public static void main (String args) args) {

       int userStreak;

       int userPoints;

       userPoints = 0;

       Scanner scnrnew Scanner(System.in);

       userStreak = scnr.nextInt();

       if (userStreak <= 25) {

           userPoints = 10;

       } else {

           userPoints = 0;

       }

   }

}

You might be interested in
A(n) ______of the audio or video clip makes the content easily accessible to people with hearing disabilities.
defon

subtitles

hope that helped you

7 0
2 years ago
Read 2 more answers
Considering the following algorithm, which of the following requirements are satisfied?
Alisiya [41]

Answer:

b) Bounded Waiting

Explanation:

int currentThread = 1;

bool thread1Access = true;

bool thread2Access = true;

thread1 { thread2 {

While (true) {

                   While (true)

                                   {

                     while(thread2Access == true)

                                       {

                                      while(thread1Access == true)

                                       {

                                            If (currentThread == 2) {

                                              If (currentThread == 1)

                                                {        

                                                  thread1Access = false; thread2Access = false;

                                                  While (currentThread == 2);

                                                 While (currentThread == 1);

                                                  thread1Access = true; thread2Access = true;

} }

/* start of critical section */ /* start of critical section */

currentThread = 2 currentThread = 1

… ...

/* end of critical section */ /* end of critical section */

thread1Access = false; thread2Access = false;

… ...

} }

} }

} }

It can be seen that in all the instances, both threads are programmed to share same resource at the same time, and hence this is the bounded waiting. For Mutual exclusion, two threads cannot share one resource at one time. They must share simultaneously. Also there should be no deadlock. For Progress each thread should have exclusive access to all the resources. Thus its definitely the not the Progress. And hence its Bounded waiting.

4 0
2 years ago
Sharon reads two different articles about avocados. The first article, in a weight loss magazine, claims that avocados are unhea
padilas [110]
The first and third.
3 0
2 years ago
Read 2 more answers
Scenario 1: Richman Investments provides high-end smartphones to several employees. The value of each smartphone is $500, and ap
vfiekz [6]

Answer:

a). SLE =$37.5

b). ARO =75

c). ALE = $2,812.5

Explanation:

a).Single loss Expectancy (SLE) is starting point in determining the single loss of an asset that will occur and calculated this;

SLE = asset value * exposure factor.

Asset value =$500,

Exposure factor is simply the percentage of asset lost.

In this case out of 1000 phones, 75 were damaged or loss.

In percentage;

75 ÷ 1000 =0.075, 0.075×100=7.5%(exposure factor).

Therefore,

SLE = $500×7.5%= $37.5.

b). ARO - Annual Rate of Occurrence is the number of times a threat on a single asset is expected to occur in one year.

In the case the damage or loss occured in 75 devices in one year.

c). ALE - Annualized loss Expectancy is the product of SLE and ARO.

Therefore;

ALE = $37.5 × 75 = $2,812.5.

3 0
2 years ago
A cell reference that has only one $ is referred to as a(n) ____ cell reference. alternative mixed relative absolute
Allushta [10]
An absolute cell reference.
4 0
2 years ago
Other questions:
  • Richard uses Microsoft outlook as his email client. He wants to check whether he has received any new mail. Identify which key R
    12·1 answer
  • Read this excerpt from The Outsiders. Or I could have gotten one of the gang to come along, one of the four boys Darry and Soda
    6·2 answers
  • Write a class called Counter that represents a simple tally counter, which might be used to count people as they enter a room. T
    9·1 answer
  • QUESTION 9 of 10: Bob charged $200 for a plane ticket last month. When he received his statement, he saw that he could pay the m
    12·2 answers
  • If you were investigating login issues on a Windows computer, which portion of the Event Viewer logs would be a good place to st
    7·1 answer
  • RADIAC instruments that operate on the ionization principle are broken down into three main categories based on what?
    15·1 answer
  • Picture an expensive item you’d LOVE to own. What would make you happier: Buying it NOW using credit/taking out a loan? Buying i
    9·1 answer
  • Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the pop
    7·1 answer
  • ) A byte is used to represent a single character in the computer ______<br> true or false?
    14·2 answers
  • PLEASE AWNSER 50 POINTS PLUS BRAINLEST ILL FAIL MY GRADE IF I DONT AWNSER IN A HOUR!
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!