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
Svet_ta [14]
3 years ago
12

Create an application named NumbersDemo whose main() method holds two integer variables. Assign values to the variables. In turn

, pass each value to methods named displayTwiceTheNumber(), displayNumberPlusFive(), and displayNumberSquared().
Engineering
1 answer:
Mashcka [7]3 years ago
4 0

Answer:

The solution code is written in C++.

  1. int main() {
  2.    int a = 5;
  3.    int b = 4;
  4.    displayTwiceTheNumber(a);
  5.    displayTwiceTheNumber(b);
  6.    displayNumberPlusFive(a);
  7.    displayNumberPlusFive(b);
  8.    displayNumberSquared(a);
  9.    displayNumberSquared(b);
  10.    return 0;
  11. }
  12. void displayTwiceTheNumber(int num){
  13.    cout << num * 2;
  14. }
  15. void displayNumberPlusFive(int num){
  16.    cout << num + 5;
  17. }
  18. void displayNumberSquared(int num){
  19.    cout << num * num;
  20. }

Explanation:

Firstly, create two integer variables, <em>a</em> and <em>b and </em>two sample values are assigned to the two variables, respectively (Line 3-4). Next, we pass the value of each variable <em>a</em> and <em>b</em> to the methods named <em>displayTwiceTheNumber(), displayNumberPlusFive(),</em> and <em>displayNumberSquared() </em>(Line 6- 13).

You might be interested in
Between chain, belt and gear drive, which causes more friction?​
loris [4]

Answer:

All of them cause friction

Explanation:

google

6 0
3 years ago
Calculate the magnitude of the velocity and the θ angular direction of the block and the bullet together when the 50 g bullet mo
almond37 [142]

Answer:

Magnitude of the velocity = 16.82 m/s

Angular direction, θ = 52.41°

Explanation:

As given ,

mass of bullet, m₁= 50g = 0.05 kg

speed of bullet , u₁ = 600 m/s

mass of the block , m₂ = 4 kg

speed of the block before collision , u₂ = 12 m/s

direction , θ = 30°

Now,

Assume that the combined velocity of bullet and block after collision = v

and the direction = θ

Now, from the conservation of momentum in x - direction :

m₁ u₁ + m₂ u₂ = ( m₁ + m₂ ) vₓ

where v = final velocity after collision

u₁ = initial velocity of bullet before collision = 0

m₁ = mass of the bullet before collision = 0.05 kg

u₂  = velocity of block before collision = 12 cos(30° )

m₂ = mass of block before collision

m₁ + m₂ = combined mass of bullet and block after collision = 0.05 + 4

∴ we get

0.05 (0) + 4(12 cos(30° ) ) = ( 0.05 + 4 ) vₓ

⇒ 0 + 4(6√3) = 4.05 vₓ

⇒24√3 = 4.05 vₓ

⇒vₓ = 10.26 m/s

Now, from the conservation of momentum in y - direction :

m₁ u₁ + m₂ u₂ = ( m₁ + m₂ ) v_{y}

where v = final velocity after collision

u₁= initial velocity of bullet before collision = 600

m₁ = mass of the bullet before collision = 0.05 kg

u₂  = velocity of block before collision = 12 sin(30° )

m₂= mass of block before collision

m₁+ m₂= combined mass of bullet and block after collision = 0.05 + 4

∴ we get

0.05 (600) + 4(12 sin(30° ) ) = ( 0.05 + 4 ) v_{y}

⇒ 30 + 4(6) = 4.05 v_{y}

⇒30 +24 = 4.05 v_{y}

⇒54 = 4.05 v_{y}

⇒v_{y} = 13.33 m/s

Now, the magnitude of the velocity = √vₓ² + v_{y}² = √(10.26)² + (13.33)²

                                                           = √105.26 + 177.68

                                                           = √282.95 = 16.82

The angular direction, θ =  tan^{-1}(\frac{v_{y} }{v_{x} }) =  tan^{-1}(\frac{13.33}{10.26}) = tan^{-1}(1.299) = 52.41°

8 0
3 years ago
Rsidential Solar Solution:a. A type of photovoltaic solar panel manufactured in China receives a rating of 250W. The rating proc
aksik [14]

Answer:

a) \eta = 13.455\%, b) E_{day} = 812.716\,kJ, c) C_{month. total} = 19.505\, USD, d) t = 40.588\,years

Explanation:

a) The area of the solar panel is:

A = (20\,ft^{2})\cdot (\frac{0.3048\,m}{1\,ft} )^{2}

A = 1.858\,m^{2}

The energy potential is determined herein:

\dot E_{o} = (1000\,\frac{W}{m^{2}} )\cdot (1.858\,m^{2})

\dot E_{o} = 1858\,W

The efficiency of the solar panel is:

\eta = \frac{\dot E}{\dot E_{o}}\times 100\%

\eta = \frac{250\,W}{1858\,W}\times 100\%

\eta = 13.455\%

b) The energy generated by the solar panel is presented below:

E_{day} = (0.135)\cdot (150\,\frac{W}{m^{2}} )\cdot (20\,ft^{2})\cdot \left(\frac{0.3048\,m}{1\,ft} \right)^{2}\cdot (6\,h)\cdot (\frac{3600\,s}{1\,h} )\cdot (\frac{1\,kJ}{1000\,J} )

E_{day} = 812.716\,kJ

c) The energy generated per month and per panel is:

E_{month} = 30\cdot E_{day}

E_{month} = 30 \cdot (812.716\,kJ)\cdot \left(\frac{1\,kWh}{3600\,kJ}  \right)

E_{month} = 6.773\,kWh

Monthly energy savings due to the use of 18 panels are:

C_{month, total} = 18\cdot E_{month}\cdot c

C_{month, total} = 18\cdot (6.773\,kWh)\cdot (\frac{0.16\,USD}{1\,kWh} )

C_{month. total} = 19.505\, USD

d) The payback of the solar energy system is:

t = \frac{9500\,USD}{12\cdot (19.505\,USD)}

t = 40.588\,years

6 0
3 years ago
Summary of Possible Weather and Associated Aviation Impacts for Geographic/Topographic Categories Common in the Western United S
ruslelena [56]

Answer: answer provided in the explanation section.

Explanation:

Weather phenomenons that would impart Aviation Operations in Santa Barbara -

1. Although winters are cold, wet, and partly cloudy here. It is in general favorable for flying. But sometimes strong winds damage this pleasant weather.

2.  The Sundowner winds cause rapid warming and a decrease in relative humidity. The wind speed is very high surrounding this area for this type of wind.  

3. Cloud is an important factor that affects aviation operations. Starting from April, here the sky is clouded up to November. The sky is overcast (80 to 100 percent cloud cover) or mostly cloudy (60 to 80 percent) 44% on a yearly basis. Thus extra cloud cover can trouble aviation operations.

4. The average hourly wind speed can also be a factor. This also experiences seasonal variations, these variations are studied carefully in the aviation industry. The windier part of the year starts in January and ends in June. In April, the wind speed can reach 9.5 miles per hour.

This and more are some factors to look into when considering wheather conditions that would affect aviation operations.

I hope this was a bit helpful. cheers

5 0
3 years ago
Technician A says vehicles with electronic throttle control do not need a separate cruise control module, stepper motor, or cabl
8_murik_8 [283]

Answer: its A

Explanation:

3 0
3 years ago
Other questions:
  • A petrol engine produces 20 hp using 35 kW of heat transfer from burning fuel. What is its thermal efficiency, and how much powe
    14·1 answer
  • Some cars have an FCW, which stands for
    13·1 answer
  • Who can use NIST resources?
    14·1 answer
  • Air enters a 200 mm diameter adiabatic nozzle at 195 deg C, 500 kPa and 100 m/s. It exits at 85 kPa. If the exit diameter is 158
    11·1 answer
  • The coefficient of performance of a reversible refrigeration cycle is always (a) greater than, (b) less than, (c) equal to the c
    12·1 answer
  • Urgent please help me...
    8·1 answer
  • How do engineering and technology impact the natural world and environment
    6·1 answer
  • What is the name for a program based on the way your brain works?
    13·2 answers
  • Am I alive I really need to know?
    11·1 answer
  • Two technicians are discussing cylinder honing technician a says a good cross hatch helps to trap the oil and retain it in the c
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!