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
Balanced forces will result in which of the following
tia_tia [17]
D is the answer. Hope this helped
8 0
3 years ago
Calculate the load, PP, that would cause AA to be displaced 0.01 inches to the right. The wires ABAB and ACAC are A36 steel and
Nataly [62]

Answer:

P = 4.745 kips

Explanation:

Given

ΔL = 0.01 in

E = 29000 KSI

D = 1/2 in  

LAB = LAC = L = 12 in

We get the area as follows

A = π*D²/4 = π*(1/2 in)²/4 = (π/16) in²

Then we use the formula

ΔL = P*L/(A*E)

For AB:

ΔL(AB) = PAB*L/(A*E) = PAB*12 in/((π/16) in²*29*10⁶ PSI)

⇒  ΔL(AB) = (2.107*10⁻⁶ in/lbf)*PAB

For AC:

ΔL(AC) = PAC*L/(A*E) = PAC*12 in/((π/16) in²*29*10⁶ PSI)

⇒  ΔL(AC) = (2.107*10⁻⁶ in/lbf)*PAC

Now, we use the condition

ΔL = ΔL(AB)ₓ + ΔL(AC)ₓ = ΔL(AB)*Cos 30° + ΔL(AC)*Cos 30° = 0.01 in

⇒  ΔL = (2.107*10⁻⁶ in/lbf)*PAB*Cos 30°+(2.107*10⁻⁶ in/lbf)*PAC*Cos 30°= 0.01 in

Knowing that   PAB*Cos 30°+PAC*Cos 30° = P

we have

(2.107*10⁻⁶ in/lbf)*P = 0.01 in

⇒  P = 4745.11 lb = 4.745 kips

The pic shown can help to understand the question.

5 0
3 years ago
Describe ICP/OES in detail.
alex41 [277]

Answer:

ICP -OES stand for inductively coupled plasma optical emission spectroscopy

Explanation:

It is techniques that known as trace level technique which help to identify and quantify the element present in sample by using spectra emission.

The analysis process include desolvates, ionization and excitation of the sample. The sample is identify by analyzing the emission line from it and quantify by analyzing the intensity of same emission lines.

7 0
3 years ago
Read 2 more answers
The waffle slab is: a) the two-way concrete joist framing system. b) a one-way floor and roof framing system. c) the one-way con
GREYUIT [131]

Answer:

a) the two-way concrete joist framing system

Explanation:

A waffle slab is also known as ribbed slab, it is a slab which as waffle like appearance with holes beneath. It is adopted in construction projects that has long length, length more than 12m. The waffle slab is rigid, therefore it is used in building that needs minimal vibration.

4 0
3 years ago
I gave 15 min to finish this java program
lisov135 [29]

Answer:

class TriangleNumbers

{

public static void main (String[] args)

{

 for (int number = 1; number <= 10; ++number) {

  int sum = 1;

  System.out.print("1");

  for (int summed = 2; summed <= number; ++summed) {

   sum += summed;

   System.out.print(" + " + Integer.toString(summed));

  }

  System.out.print(" = " + Integer.toString(sum) + '\n');

 }

}

}

Explanation:

We need to run the code for each of the 10 lines. Each time we sum  numbers from 1 to n. We start with 1, then add numbers from 2 to n (and print the operation). At the end, we always print the equals sign, the sum and a newline character.

4 0
3 years ago
Other questions:
  • Suppose you are implementing a relational employee database, where the database is a list of tuples formed by the names, the pho
    14·1 answer
  • Disconnecting means shall be capable of being locked in the open position. The provisions for locking do not have to reamin in p
    14·1 answer
  • A non-linear analog force sensor outputs the following voltages for different forces.
    7·1 answer
  • Two pressure gauges measure a pressure drop of 16.3 psi (lb/in.2) at the entrance and exit of an old buried pipeline. The origin
    13·1 answer
  • Using only the sequential operations described in Section 2.2.2, write an algorithm that gets two values: the price for item A a
    5·1 answer
  • A logic chip used in a computer dissipates 3 W of power in an environment at 120°F, and has a heat transfer surface area of 0.08
    11·1 answer
  • The uniform crate has a mass of 50 kg and rests on the cart having an inclined surface. Determine the smallest acceleration that
    10·1 answer
  • What are practical considerations you might encounter when you increase the moment of inertia (I) while keeping the cross-sectio
    13·1 answer
  • The toughness of a material does what, when it's been heated?​
    7·1 answer
  • Hey answer quick for 20 points
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!