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
Tanzania [10]
3 years ago
5

Choose the best data type for each of the following so that any reasonable value is accommodated but no memory storage is wasted

. Give an example of a typical value that would be held by the variable, and explain why you chose the type you did.
a. the number of siblings you have

b. your final grade in this class

c. the population of Earth

d. the population of a U.S. county

e. the number of passengers on a bus

f. one player's score in a Scrabble game

g. one team's score in a Major League Baseball game

h. the year an historical event occurred

i. the number of legs on an animal

j. the price of an automobile
Engineering
1 answer:
stiks02 [169]3 years ago
3 0

Answer:

Explanation:

Part (a):

Statement : The number of siblings you have

Suitable Data type : Byte

Typical Value : From -128 and up to 127

Explanation: Byte data type is the most suitable since it can covers minimum and maximum number of siblings one can have.

Part (b):

Statement : Your final grade in this class

Suitable Data type : Char

Typical Value : 1 byte

Explanation: Grades is in the form of alphabetical letter which is either A, B, C, D, F or E which can be stored in character data type.

Part (c):

Statement : Population of Earth

Suitable Data type : Long

Maximum Value : 9223372036854775807

Explanation: Long Data takes up to 8 bytes and can store up to 9223372036854775807 which can cater for more than 36 billion. The population of earth is only around 7 billion currently making Long data type the most suitable data type to store earth population.

Part (d):

Statement : Population of US Country

Suitable Data type : Integer

Typical Value :2147483647

Explanation: Integer data type takes up to 4 bytes and can store up to  2147483647 making it suitable to store U.S population.

Part (e):

Statement : The number of passengers on bus

Suitable Data type : Byte

Typical Value :From -128 up to 127

Explanation: The typical maximum number of passengers of a bus are only around 72. Byte data type is the most suitable since it can cater the number up to 127.

Part (f):

Statement : Player's score in a Scrabble game

Suitable Data type : Short

Typical Value : 32767

Explanation: The maximum point can be scored in the Scrabble game is only 830 therefore the most suitable data type for this case is the short data type.

Part (g):

Statement : One team's score in a Major League Baseball game

Suitable Data type : Byte

Typical Value : From -128 up to 127

Explanation: The maximum point can be scored in the Base ball game is only 49 therefore the most suitable data type for this case is the Byte data type since it can cater up to 127.

Part (h):

Statement : The year an historical event occurred

Suitable Data type : Short

Maximum Value: 32767

Explanation: The historic event year can be any number from 1 to 2020 therefore the most suitable data type is the short data type.

Part (i):

Statement : The number of legs on an animal

Suitable Data type : Short

Maximum Value: 32767

Explanation: The most number of legs found are 750 legs therefore the most suitable data type is the short data type which can cater up to 32767.

Part (j):

Statement : The Price of an automobile

Suitable Data type : Float

Maximum Value: 340282350

Explanation: The most expensive car is around 15 million therefore the most suitable data type is the float data type which can cater up to 340 million.  

You might be interested in
Consider a modification of the air-standard Otto cycle in which the isentropic compression and expansion processes are each repl
Ulleksa [173]

Answer:

The answers to the question are

(1) Process 1 to 2

W = 295.16 kJ/kg

Q = -73.79 kJ/kg

(2) Process 2 to 3

W = 0

Q = 1135.376 kJ/kg

(3) Process 3 to 4

W = -1049.835 kJ/kg

Q = 262.459 kJ/kg

(4) Process 4 to 3

W=0

Q = -569.09 kJ/kg

(b) The thermal efficiency = 49.9 %

(c) The mean effective pressure is 9.44 bar

Explanation:

(a) Volume compression ratio \frac{v_1}{v_2}  = 10

Initial pressure p₁ = 1 bar

Initial temperature, T₁ = 310 K

cp = 1.005 kJ/kg⋅K

Temperature T₃ = 2200 K from the isentropic chart of the Otto cycle

For a polytropic process we have

\frac{p_1}{p_2}  = (\frac{v_2}{v_1} )^n Therefore p₂ = p₁ ÷ (\frac{v_2}{v_1} )^n = (1 bar) ÷ (\frac{1}{10} )^{1.3} = 19.953 bar

Similarly for a polytropic process we have

\frac{T_1}{T_2}  = (\frac{v_2}{v_1} )^{n-1} or T₂ = T₁ ÷ (\frac{v_2}{v_1} )^{n-1} = \frac{310}{0.1^{0.3}} = 618.531 K

The molar mass of air is 28.9628 g/mol.

Therefore R = \frac{8.3145}{28.9628} = 0.287 kJ/kg⋅K

cp = 1.005 kJ/kg⋅K Therefore cv = cp - R =  1.005- 0.287 = 0.718 kJ/kg⋅K

1). For process 1 to 2 which is polytropic process we have

W = \frac{R(T_2-T_1)}{n-1} = \frac{0.287(618.531-310)}{1.3 - 1}= 295.16 kJ/kg

Q =(\frac{n-\gamma}{\gamma - 1} )W = (\frac{1.3-1.4}{1.4-1} ) 295.16 kJ/kg = -73.79 kJ/kg

W = 295.16 kJ/kg

Q = -73.79 kJ/kg

2). For process 2 to 3 which is reversible constant volume heating we have

W = 0 and Q = cv×(T₃ - T₂) = 0.718× (2200-618.531) = 1135.376 kJ/kg

W = 0

Q = 1135.376 kJ/kg

3). For process 3 to 4 which is polytropic process we have

W = \frac{R(T_4-T_3)}{n-1} = Where T₄ is given by  \frac{T_4}{T_3}  = (\frac{v_3}{v_4} )^{n-1} or T₄ = T₃ ×0.1^{0.3}

= 2200 ×0.1^{0.3}  T₄ = 1102.611 K

W =  \frac{0.287(1102.611-2200)}{1.3 - 1}= -1049.835 kJ/kg

and Q = 262.459 kJ/kg

W = -1049.835 kJ/kg

Q = 262.459 kJ/kg

4). For process 4 to 1 which is reversible constant volume cooling we have

W = 0 and Q = cv×(T₁ - T₄) = 0.718×(310 - 1102.611) = -569.09 kJ/kg

W=0

Q = -569.09 kJ/kg

(b) The thermal efficiency is given by

\eta = 1-\frac{T_4-T_1}{T_3-T_2} =1-\frac{1102.611-310}{2200-618.531} = 0.499 or 49.9 % Efficient

(c) The mean effective pressure is given by

p_{m}  = \frac{p_1r[(r^{n-1}-1)(r_p-1)]}{ (n-1)(r-1)}  where r = compression ratio and r_p = \frac{p_3}{p_2}

However p₃ = \frac{p_2T_3}{T_2} =\frac{(19.953)(2200)}{618.531} =70.97 atm

r_p = \frac{p_3}{p_2} = \frac{70.97}{19.953}  = 3.56

Therefore p_m =\frac{1*10*[(10^{0.3}-1)(3.56-1)]}{0.3*9} = 9.44 bar

Please find attached generalized diagrams of the Otto cycle

8 0
3 years ago
Only put coolant into your radiator when the engine is _____.
Arada [10]

Only put ciilant into ur radiator when the engine is cool (D)

5 0
3 years ago
A large tank is filled to capacity with 500 gallons of pure water. Brine containing 2 pounds of salt per gallon is pumped into t
Nataly [62]

Answer:

A) A(t) = 10(100 - t) + c(100 - t)²

B) Tank will be empty after 100 minutes.

Explanation:

A) The differential equation of this problem is;

dA/dt = R_in - R_out

Where;

R_in is the rate at which salt enters

R_out is the rate at which salt exits

R_in = (concentration of salt in inflow) × (input rate of brine)

We are given;

Concentration of salt in inflow = 2 lb/gal

Input rate of brine = 5 gal/min

Thus;

R_in = 2 × 5 = 10 lb/min

Due to the fact that the solution is pumped out at a faster rate, thus it is reducing at the rate of (5 - 10)gal/min = -5 gal/min

So, after t minutes, there will be (500 - 5t) gallons in the tank

Therefore;

R_out = (concentration of salt in outflow) × (output rate of brine)

R_out = [A(t)/(500 - 5t)]lb/gal × 10 gal/min

R_out = 10A(t)/(500 - 5t) lb/min

So, we substitute the values of R_in and R_out into the Differential equation to get;

dA/dt = 10 - 10A(t)/(500 - 5t)

This simplifies to;

dA/dt = 10 - 2A(t)/(100 - t)

Rearranging, we have;

dA/dt + 2A(t)/(100 - t) = 10

This is a linear differential equation in standard form.

Thus, the integrating factor is;

e^(∫2/(100 - t)) = e^(In(100 - t)^(-2)) = 1/(100 - t)²

Now, let's multiply the differential equation by the integrating factor 1/(100 - t)².

We have;

So, we ;

(1/(100 - t)²)(dA/dt) + 2A(t)/(100 - t)³ = 10/(100 - t)²

Integrating this, we now have;

A(t)/(100 - t)² = ∫10/(100 - t)²

This gives;

A(t)/(100 - t)² = (10/(100 - t)) + c

Multiplying through by (100 - t)²,we have;

A(t) = 10(100 - t) + c(100 - t)²

B) At initial condition, A(0) = 0.

So,0 = 10(100 - 0) + c(100 - 0)²

1000 + 10000c = 0

10000c = -1000

c = -1000/10000

c = -0.1

Thus;

A(t) = 10(100 - t) + -0.1(100 - t)²

A(t) = 1000 - 10t - 0.1(10000 - 200t + t²)

A(t) = 1000 - 10t - 1000 + 20t - 0.1t²

A(t) = 10t - 0.1t²

Tank will be empty when A(t) = 0

So, 0 = 10t - 0.1t²

0.1t² = 10t

Divide both sides by 0.1t to give;

t = 10/0.1

t = 100 minutes

6 0
3 years ago
When replacing a timing belt, many experts and vehicle manufacturers recommend that all of the following should be replaced exce
lora16 [44]

Answer:

Correct Answer:

A. water pump

Explanation:

<em>Timing belt in a vehicle helps to ensure that crankshaft, pistons and valves operate together in proper sequence.</em> Timing belts are lighter, quieter and more efficient than chains that was previously used in vehicles.

<em>Most car manufacturers recommended that, when replacing timing belt, tension assembly, water pump, camshaft oil seal should also be replaced with it at same time. </em>

7 0
3 years ago
Proper ventilation is required when welding, so that you don't ____________.
galben [10]
I say the answers is A but if you mean ventilation in the area of the room then answer B
4 0
3 years ago
Read 2 more answers
Other questions:
  • A 3-kg block rests on top of a 2-kg block supported by, but not attached to, a spring of constant 40 N/m. The upper block is sud
    14·2 answers
  • A circular section of material is tested. The original specimen is 200 mm long and has a diameter of 13 mm. When loaded to its p
    11·2 answers
  • Give a reason why fighter aircraft use mid-wing design.
    11·1 answer
  • The goal of the Concept Selection phase is to (please choose the best answer): Group of answer choices
    10·1 answer
  • Consider a 5 m long, air-filled section of a coaxial transmission line, given that the radius of the inner conductor is 10 cm an
    7·1 answer
  • List five things the welding symbol will tell the welder about the weld that is to be made.​
    13·1 answer
  • Simplify the following expressions, then implement them using digital logic gates. (a) f = A + AB + AC (b) f = AB + AC + BC (c)
    5·1 answer
  • A three-point bending test is performed on a glass specimen having a rectangular cross section of height 5.3 mm and width 11.6 m
    11·1 answer
  • Which band has an average of $3.58 per hour of parking?
    11·1 answer
  • At time t the resultant force on a particle, of mass 250kg is (300ti-400tj)N. Initially, the particle is at the origin and is mo
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!