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
docker41 [41]
3 years ago
9

1 import java.util.Scanner; 3 public class EqualityAndRelational { 4 public static void main (String args) args) { int userBonus

; int userPoints; userPoints-0; Scanner scnrnew Scanner(System.in); 7 10 userBonus = scnr.nextInt(); // Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19 * Your solution goes here userPoints-10 else userPoints = 0;
Engineering
1 answer:
Anastaziya [24]3 years ago
7 0

Missing Part of the Question

Complete the expression so that userPoints is assigned with 0 if userBonus is greater than 20 (second branch). Otherwise, userPoints 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 scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

( Your solution goes here)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

Answer;

Replace

( Your solution goes here)

With

if(userBonus>20).

The full program becomes

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

if(userBonus>20)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

You might be interested in
A sum of $500,000 will be invested by a firm two years from now. If money is worth 12%, what will be the worth of this investmen
notka56 [123]

Answer:

investment 10 years from now is $1,238,000 .

Explanation:

given data

sum = $500,000

rate = 12% =0.12

total time = 10 year

solution

as present value After 2 years from now is $500,000

so time period is now = 8 year  ( 10 - 2 )

so we apply future value formula that is

Future value  = present value × (1+r)^{t}   ............1

put here value we get

Future value  = $500,000 × (1+0.12)^{8}  

Future value  = $500,000 × 2.476

Future value  = $1,238,000  

so investment 10 years from now is $1,238,000 .

8 0
3 years ago
Consider a very long rectangular fin attached to a flat surface such that the temperature at the end of the fin is essentially t
zepelin [54]

Answer:

attached below

Explanation:

4 0
4 years ago
What oil specification is used to express the thickness (viscosity) of the oil?​
Marianna [84]

Answer:

Viscosity is notated using the common classification “XW-XX”. The number preceding the “W” (winter) rates the oil's flow (viscosity) at zero degrees Fahrenheit (-17.8 degrees Celsius). The lower the number, the less the oil thickens in cold weather.

7 0
3 years ago
If the price of the car is less than or equal to your available cash, display "no". If the price of the car is more than your av
Ede4ka [16]

Answer:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

Explanation:

using functions in Javascript:

functions; this refers to dividing codes into reusable parts.

e.g function function_name() {

console.log("How are you?");

}

you can call or invoke this function by using its name followed by parenthesis, like this: function_name(). each time the function is called it will   print out "How are you?".

Parameters: these are variables that act as placeholders for the values that are to be input into a function when it is called

Arguments: The actual values that input or passed into a function when it is called.

e.g

function function_name(parameter1, parameter2) {

console.log(parameter1, parameter2);

}

then we call function_name: function_name("please", "leave"):we have passed two arguments, "please"  and "leave". Inside the function parameter1 equals "please" while parameter2 equals "leave".

Hence, from the question given the two parameters "car_price" and "available_cash" respectively, we write the function with name function_name:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

7 0
3 years ago
A Carnot refrigeration cycle absorbs heat at -12 °C and rejects it at 40 °C. a)-Calculate the coefficient of performance of this
tresset_1 [31]

Answer:

a)COP=5.01

b)W_{in}=2.998 KW

c)COP=6.01

d)Q_R=17.99 KW

Explanation:

Given

T_L= -12°C,T_H=40°C

For refrigeration

  We know that Carnot cycle is an ideal cycle that have all reversible process.

So COP of refrigeration is given as follows

COP=\dfrac{T_L}{T_H-T_L}  ,T in Kelvin.

COP=\dfrac{261}{313-261}

a)COP=5.01

Given that refrigeration effect= 15 KW

We know that  COP=\dfrac{RE}{W_{in}}

RE is the refrigeration effect

So

5.01=\dfrac{15}{W_{in}}

b)W_{in}=2.998 KW

For heat pump

So COP of heat pump is given as follows

COP=\dfrac{T_h}{T_H-T_L}  ,T in Kelvin.

COP=\dfrac{313}{313-261}

c)COP=6.01

In heat pump

Heat rejection at high temperature=heat absorb at  low temperature+work in put

Q_R=Q_A+W_{in}

Given that Q_A=15KW

We know that  COP=\dfrac{Q_R}{W_{in}}

COP=\dfrac{Q_R}{Q_R-Q_A}

6.01=\dfrac{Q_R}{Q_R-15}

d)Q_R=17.99 KW

5 0
3 years ago
Other questions:
  • Use the convolutional integral to find the response of an LTI system with impulse response ℎ(????) and input x(????). Sketch the
    8·1 answer
  • Some cars have an FCW, which stands for
    13·1 answer
  • Water flows at low speed through a circular tube with inside diameter of 2 in. A smoothly contoured body of 1.5 in. diameter is
    10·1 answer
  • Write a modular program that finds the equation, area, and circumference of a circle, given the coordinates of the center of the
    11·1 answer
  • What happens to a commercial airline at cruising altitude if the pilot does not touch the throttles?
    12·1 answer
  • Explain why the scenario below fails to illustrate an understanding of the importance of metrology. Situation: Natalie is a cali
    6·1 answer
  • Carbon resistors often come as a brown cylinder with colored bands. These colored bands can be read to determine the manufacture
    7·1 answer
  • Consider two Carnot heat engines operating in series. The first engine receives heat from the reservoir at 1400 K and rejects th
    6·1 answer
  • Answer back to question for la ,lot points
    10·1 answer
  • You should use the pass technique a fire extinguisher
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!