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
The rate of energy transfer by work is called power. a)-True b)-False
Pie

Answer:

Yes the statement is true.

Explanation:

Power is defined as the rate at which energy is transferred by an object on account of work done.

Mathematically

Power=\frac{dE}{dt}

An object that does work loses it's energy while an object on which work is done gains energy.

Power is often dependent on the type of energy transfer thus we have Electrical Power, Mechanical Power depending on the type of energy involved in the system.

Concept of power is important since it gives us a measure of how fast energy can be derived to given to a system.

5 0
3 years ago
The diameter of a cylindrical water tank is Do and its height is H. The tank is filled with water, which is open to the atmosphe
Sonbull [250]

Answer:

a. The time required for the tank to empty halfway is presented as follows;

t_1   =   \dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} } \cdot \left (\sqrt{2} -1 \right)

b. The time it takes for the tank to empty the remaining half is presented as follows;

t_2  = { \dfrac{ D_0^2  }{D} \cdot\sqrt{\dfrac{H}{g} }

The total time 't', is presented as follows;

t =  \sqrt{2}  \cdot \dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} }

Explanation:

a. The diameter of the tank = D₀

The height of the tank = H

The diameter of the orifice at the bottom = D

The equation for the flow through an orifice is given as follows;

v = √(2·g·h)

Therefore, we have;

\dfrac{P_1}{\gamma} + z_1 + \dfrac{v_1}{2 \cdot g} = \dfrac{P_2}{\gamma} + z_2 + \dfrac{v_2}{2 \cdot g}

\left( \dfrac{P_1}{\gamma} -\dfrac{P_2}{\gamma} \right) + (z_1 - z_2) + \dfrac{v_1}{2 \cdot g} =  \dfrac{v_2}{2 \cdot g}

Where;

P₁ = P₂ = The atmospheric pressure

z₁ - z₂ = dh (The height of eater in the tank)

A₁·v₁ = A₂·v₂

v₂ = (A₁/A₂)·v₁

A₁ = π·D₀²/4

A₂ = π·D²/4

A₁/A₂ = D₀²/(D²) = v₂/v₁

v₂ = (D₀²/(D²))·v₁ = √(2·g·h)

The time, 'dt', it takes for the water to drop by a level, dh, is given as follows;

dt = dh/v₁ = (v₂/v₁)/v₂·dh = (D₀²/(D²))/v₂·dh = (D₀²/(D²))/√(2·g·h)·dh

We have;

dt = \dfrac{D_0^2}{D} \cdot\dfrac{1}{\sqrt{2\cdot g \cdot h} } dh

The time for the tank to drop halfway is given as follows;

\int\limits^{t_1}_0 {} \,  dt = \int\limits^h_{\frac{h}{2} } { \dfrac{D_0^2}{D} \cdot\dfrac{1}{\sqrt{2\cdot g \cdot h} } } \, dh

t_1  =\left[{ \dfrac{D_0^2}{D\cdot \sqrt{2\cdot g} } \cdot\dfrac{h^{-\frac{1}{2} +1}}{-\frac{1}{2} +1 } \right]_{\frac{H}{2} }^{H} =\left[ { \dfrac{D_0^2 \cdot 2\cdot \sqrt{h} }{D\cdot \sqrt{2\cdot g} } \right]_{\frac{H}{2} }^{H} = { \dfrac{2 \cdot D_0^2 }{D\cdot \sqrt{2\cdot g} } \cdot \left(\sqrt{H} - \sqrt{\dfrac{H}{2} } \right)

t_1   = { \dfrac{2 \cdot D_0^2 }{D^2\cdot \sqrt{2\cdot g} } \cdot \left(\sqrt{H} - \sqrt{\dfrac{H}{2} } \right) =  { \dfrac{\sqrt{2}  \cdot D_0^2 }{D^2\cdot \sqrt{ g} } \cdot \left(\sqrt{H} - \sqrt{\dfrac{H}{2} } \right)

t_1   =   { \dfrac{\sqrt{2}  \cdot D_0^2 }{D^2\cdot \sqrt{ g} } \cdot \left(\sqrt{H} - \sqrt{\dfrac{H}{2} } \right) = { \dfrac{D_0^2 }{D^2\cdot \sqrt{ g} } \cdot \left(\sqrt{2 \cdot H} - \sqrt{{H} } \right) =\dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} } \cdot \left (\sqrt{2} -1 \right)The time required for the tank to empty halfway, t₁, is given as follows;

t_1   =   \dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} } \cdot \left (\sqrt{2} -1 \right)

(b) The time it takes for the tank to empty completely, t₂, is given as follows;

\int\limits^{t_2}_0 {} \,  dt = \int\limits^{\frac{h}{2} }_{0 } { \dfrac{D_0^2}{D} \cdot\dfrac{1}{\sqrt{2\cdot g \cdot h} } } \, dh

t_2  =\left[{ \dfrac{D_0^2}{D\cdot \sqrt{2\cdot g} } \cdot\dfrac{h^{-\frac{1}{2} +1}}{-\frac{1}{2} +1 } \right]_{0}^{\frac{H}{2} } =\left[ { \dfrac{D_0^2 \cdot 2\cdot \sqrt{h} }{D\cdot \sqrt{2\cdot g} } \right]_{0 }^{\frac{H}{2} } = { \dfrac{2 \cdot D_0^2 }{D\cdot \sqrt{2\cdot g} } \cdot \left( \sqrt{\dfrac{H}{2} } -0\right)

t_2  = { \dfrac{ D_0^2  }{D} \cdot\sqrt{\dfrac{H}{g} }

The time it takes for the tank to empty the remaining half, t₂, is presented as follows;

t_2  = { \dfrac{ D_0^2  }{D} \cdot\sqrt{\dfrac{H}{g} }

The total time, t, to empty the tank is given as follows;

t = t_1 + t_2 =   \dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} } \cdot \left (\sqrt{2} -1 \right) + t_2  = { \dfrac{ D_0^2  }{D} \cdot\sqrt{\dfrac{H}{g} } =  \dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} } \cdot \sqrt{2}

t =  \sqrt{2}  \cdot \dfrac{D_0^2 }{D^2 } \cdot \sqrt{ \dfrac{H}{g} }

3 0
2 years ago
Writing an excellent problem statement will not help guide you through the rest of the process and steer you towards the BEST so
Ilya [14]

Answer:

Writing an excellent problem statement will not help guide you through the rest of the process and steer you towards the BEST solution.

False

Explanation:

An excellent problem statement sets the overall tone for the rest of the engineering process, whether it be at the analysis, design, or implementation stages.  This is why a problem statement must be focused, clear, and specific.  An excellent problem statement contains the problem definition, method for solving the problem (the claim proposed), purpose, statement of objectives, and scope.  For an excellent problem statement to be effective, it must also show the gap that is to be closed to achieve the intended objective.

4 0
3 years ago
while performing a running compression test how should running compression compare to static compression
algol [13]

Answer:

The idle speed of a running compression should be between 50-75 PSI and that is about half of the static compression.

Explanation:

The Running or Dynamic compression is used to determine how well the cylinder in an engine  is absorbing air, reserving it for the proper length of time, and releasing it to the exhaust. The static or cranking compression test is used to check the sealing of the cylinder. Before performing the running compression test, the static compression test is first performed to rule out other issues like bent valves.

The standard value for the static compression is given by;

Compression ratio * 14.7 = Manufacturers Specification

The running compression should always be half of the static compression.

5 0
2 years ago
At a point on the free surface of a stressed body, the normal stresses are 20 ksi (T) on a vertical plane and 30 ksi (C) on a ho
victus00 [196]

Answer:

The principal stresses are σp1 = 27 ksi, σp2 = -37 ksi and the shear stress is zero

Explanation:

The expression for the maximum shear stress is given:

\tau _{M} =\sqrt{(\frac{\sigma _{x}^{2}-\sigma _{y}^{2}  }{2})^{2}+\tau _{xy}^{2}    }

Where

σx = stress in vertical plane = 20 ksi

σy = stress in horizontal plane = -30 ksi

τM = 32 ksi

Replacing:

32=\sqrt{(\frac{20-(-30)}{2} )^{2} +\tau _{xy}^{2}  }

Solving for τxy:

τxy = ±19.98 ksi

The principal stress is:

\sigma _{x}+\sigma _{y} =\sigma _{p1}+\sigma _{p2}

Where

σp1 = 20 ksi

σp2 = -30 ksi

\sigma _{p1}  +\sigma _{p2}=-10 ksi (equation 1)

\tau _{M} =\frac{\sigma _{p1}-\sigma _{p2}}{2} \\\sigma _{p1}-\sigma _{p2}=2\tau _{M}\\\sigma _{p1}-\sigma _{p2}=32*2=64ksi equation 2

Solving both equations:

σp1 = 27 ksi

σp2 = -37 ksi

The shear stress on the vertical plane is zero

4 0
3 years ago
Other questions:
  • What is a thermal reservoir?
    15·1 answer
  • Please describe a real situation in which you had to troubleshoot and fix the failure of a piece equipment/machine?
    5·1 answer
  • An electronic device dissipating 25 W has a mass of 20 g and a specific heat of 850 J/kg·0K. The device is lightly used, and it
    9·1 answer
  • Might give brainliest
    8·1 answer
  • An atom that gained an electron is called​
    10·2 answers
  • Ohm's law states that the current (I) in amps equals the voltage (E) in volts decided by the resistance (R) in ohm's. If you con
    15·1 answer
  • g Asbestos is a fibrous silicate mineral with remarkably high tensile strength. But is no longer used because airborne asbestos
    5·1 answer
  • Cup-sveg-aph<br><br>I m finding gf<br><br>if anyone interested pls come​
    11·2 answers
  • What document should you have from the engine manufacturer when working on an engine
    8·1 answer
  • Explain how to properly engage the safety latches on the Stan Design Pit Jack.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!