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]
4 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]4 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
Steam enters a turbine at 120 bar, 508oC. At the exit, the pressure and quality are 50 kPa and 0.912, respectively. Determine th
Archy [21]

Answer:

The turbine produces <u>955.53 KW</u> power.

Explanation:

Taking the turbine as a system. Applying Law of Conservation of Energy:

m(h₁ - h₂) - Heat Loss = P

where,

m = mass flow rate of steam = 1.31 kg/s

h₁ = enthalpy at state 1 (120 bar and 508°C)

h₂ = enthalpy at state 2 (50 KPa and x = 0.912)

Heat Loss = 225 KW

P = Power generated by turbine = ?

First, we find h₁ from super steam tables:

At,

T = 508°C

P = 120 bar = 12000 KPa = 12 MPa

we find that steam is in super-heated state with enthalpy:

Due to unavailibility of values in chart we approximate the state to 500° C and 12.5 MPa:

h₁ = 3343.6 KJ/kg

Now, for state 2, we have:

P = 50 KPa and x = 0.912

From saturated steam table:

h₂ = hf₂ + x(hfg₂) = 340.54 KJ/kg + (0.912)(2304.7 KJ/kg)

h₂ = 2442.4 KJ/kg

Now, using values in the conservation equation:

(1.31 kg/s)(3343.6 KJ/kg - 2442.4 KJ/kg) - 225 KW = P

<u>P = 955.53 KW</u>

5 0
3 years ago
A rectangular open box, 25 ft by 10 ft in plan and 12 ft deep weighs 40 tons. Sufficient amount of stones is placed in the box a
dimulka [17.4K]

Answer:

44.95 tonnes

Explanation:

According to principle of buoyancy the object will just sink when it's weight is more than the weight of the liquid it displaces

It is given that empty weight of box = 40 tons

Let the mass of the stones to be placed be = M tonnes

Thus the combined mass of box and stones = (40+M) tonnes..........(i)

Since the box will displace water equal to it's volume V we have volume of box = 25ft*10ft*12ft= 3000ft^{3}

Volume= 84.95m^{3}

Since 1ft^{3} =0.028m^{3}

Now the weight of water displaced = Weight =\rho \times Volumewhererho is density of water = 1000kg/m^{3}

Thus weight of liquid displaced = \frac{84.95X1000}{1000}tonnes=84.95 tonnes..................(ii)

Equating i and ii we get

40 + M = 84.95

thus Mass of stones = 44.95 tonnes

3 0
3 years ago
Design a half-wave recti er which provides a peak voltage of 15 V, and anaverage voltage of 3.8 V when driven by a 120 V (rms) a
nirvana33 [79]

Answer:

You need a 120V to 24V commercial transformer  (transformer 1:5), a 100 ohms resistance, a 1.5 K ohms resistance and a diode with a minimum forward current of 20 mA (could be 1N4148)

Step by step design:

  1. Because you have a 120V AC voltage supply you need an efficient way to reduce that voltage as much as possible before passing to the rectifier, for that I recommend a standard 120V to 24V transformer.  120 Vrms = 85 V and 24 Vrms = 17V = Vin
  2. Because 17V is not 15V you still need a voltage divider to step down that voltage, for that we use R1 = 100Ω and R2 = 1.3KΩ. You need to remember that more than 1 V is going to be in the diode, so for our calculation we need to consider it. Vf = (V*R2)/(R1+R2), V = Vin - 1 = 17-1 = 16V and Vf = 15, Choosing a fix resistance R1 = 100Ω and solving the equation we find R2 = 1.5KΩ
  3. Finally to select the diode you need to calculate two times the maximum current and that would be the forward current (If) of your diode. Imax = Vf/R2 = 10mA and If = 2*Imax = 20mA

Our circuit meet the average voltage (Va) specification:

Va = (15)/(pi) = 4.77V considering the diode voltage or 3.77V without considering it

6 0
4 years ago
What happens to the duty cycle for a GMAW Gun when 75Ar/25COzgas
skad [1K]

So what happens is the host will not kill the y no se que hacer para no one can see it in

6 0
3 years ago
What does the word “robot” mean? A.Clone B. Athlete C. Servant D. Actor
hram777 [196]

Answer:

a. clone

Explanation:

4 0
3 years ago
Other questions:
  • The elementary liquid-phase series reaction
    11·1 answer
  • Nitrate salts (NO3-), when heated, can produce nitrites (NO2-) plus oxygen (O2). A sample of potassium nitrate is heated, and th
    9·1 answer
  • A simple ideal Rankine cycle with water as the working fluid operates between the pressure limits of 4 MPa in the boiler and 25
    14·2 answers
  • When using levers like scissors or hedge clippers, what can be done to increase the cutting force so that you don’t have to sque
    5·1 answer
  • Which of the following is an example of an iterative process?
    12·1 answer
  • Both carpenters and building inspectors have been associated with the personality characteristics identified as realistic, conve
    12·1 answer
  • Python lists are commonly used to store data types. Lists are a collection of information typically called a container. Think of
    5·1 answer
  • You are analyzing an open-return wind tunnel that intakes air at 20 m/s and 320K. When the flow exits the wind tunnel it is movi
    14·2 answers
  • two cars travel on a straight road from the point. A to point B both cars accelerate to their maximum speed and then continue at
    10·1 answer
  • Chandler is working on a school editing project. Because he copied 10 GB of raw footage to his computer, its memory is running l
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!