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
PLEASE HELP 100 POINTS!!! WILL MARK BRAINLIEST
OlgaM077 [116]
Business plan, a good strategy to help pin point the house best fetchers
5 0
3 years ago
Read 2 more answers
Which rules of the road apply to people riding bicycles, under Illinois law? *
bulgar [2K]

Answer:

C-People biking must follow all rules and laws applicable to a motorist, with some minor exceptions​

Explanation:

People biking should ride on the right side of the right lane when safe, except to pass or make a left turn. When there is only one lane for traffic traveling in each direction and passing is permitted, the center of the street is marked with a broken yellow stripe

~Hope this helps!

4 0
3 years ago
The biggest advantage of sketches is that
steposvetlana [31]

Answer:

They communicate ideas very quickly.

Explanation:

8 0
3 years ago
Why is it important to cut all the way through an electrical wire on the first try?
lbvjy [14]

Answer:

I always thought it was so that the older wire could not have a problem and have another electrician must come back and fix it.

Explanation:

6 0
3 years ago
A 4-pole, 3-phase induction motor operates from a supply whose frequency is 60 Hz. calculate: 1- the speed at which the magnetic
DiKsa [7]

Answer:

The answer is below

Explanation:

1) The synchronous speed of an induction motor is the speed of the magnetic field of the stator. It is given by:

n_s=\frac{120f_s}{p}\\ Where\ p\ is \ the \ number\ of\ machine\ pole, f_s\ is\ the\ supply \ frequency\\and\ n_s\ is \ the \ synchronous\ speed(speed \ of\ stator\ magnetic \ field)\\Given: f_s=60\ Hz, p=4. Therefore\\\\n_s=\frac{120*60}{4}=1800\ rpm

2) The speed of the rotor is the motor speed. The slip is given by:

Slip=\frac{n_s-n_m}{n_s}. \\ n_m\ is\ the \ motor\ speed(rotor\ speed)\\Slip = 0.05, n_s= 1800\ rpm\\ \\0.05=\frac{1800-n_m}{1800}\\\\ 1800-n_m=90\\\\n_m=1800-90=1710\ rpm

3) The frequency of the rotor is given as:

f_r=slip*f_s\\f_r=0.04*60=2.4\ Hz

4) At standstill, the speed of the motor is 0, therefore the slip is 1.

The frequency of the rotor is given as:

f_r=slip*f_s\\f_r=1*60=60\ Hz

6 0
3 years ago
Other questions:
  • A tank contains liquid nitrogen at -190℃ is suspended in a vacuum shell by three stainless steel rods 0.80 cm in diameter and 3
    8·1 answer
  • An air-standard Otto cycle has a compression ratio of 6 and the temperature and pressure at the beginning of the compression pro
    13·1 answer
  • Two AAA-size lithium batteries are connected in series in a flashlight. Each battery has 3.5 volt and 4- Amp-hour capacity. If t
    8·1 answer
  • Se requiere un permiso aprobación o restricción contaminante para todos los métodos comerciales de descarga de aguas residuales
    13·1 answer
  • There are two questions about SolidWorks.
    9·1 answer
  • ). A 50 mm diameter cylinder is subjected to an axial compressive load of 80 kN. The cylinder is partially
    8·1 answer
  • A force 25 N makes an angle of 30,45 and 75 degree with x,y and z axis. What should be the corresponding force vector?
    8·1 answer
  • Both equilibrium equations and constitutive models are needed to solve statically indeterminate problems. a)- True b)-False
    13·1 answer
  • How did humans create a space suit without ever going. How did we know spaces conditions?
    5·2 answers
  • Which of the following describes what a manufacturing engineer does
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!