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
What is the angular velocity (in rad/s) of a body rotating at N r.p.m.?
Darina [25.2K]

Answer:

0.1047N

Explanation:

To solve this problem we must remember the conversion factors, remembering that 1 revolution equals 2π radians and 1min equals 60s

N\frac{rev}{min} \frac{2\pi }{1rev} \frac{1min}{60} =N\frac{2\pi }{60} =0.1047N

in conclusion, to know how many rad / s an element rotates which is expressed in Rev / min we must only multiply by 0.1047

3 0
3 years ago
In the planning process of the product development life cycle what is it important to inventory
Verizon [17]

Your Answer would be A I believe.

6 0
2 years ago
What are the two reasons for a clear cut
Inessa [10]

Answer:

to clear land for agriculture and settlement and to use or sell timber for lumber, paper products, or fuel.

3 0
2 years ago
A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the mot
Thepotemich [5.8K]

78950W the answer

Explanation:

A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the motor efficiency excluding field and stator losses, is 95%and X=2.5ohms. calculate the mechanical power developed, the Armature current, back e.m.f, power angle and maximum or pull out torque of the motor

A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the motor efficiency excluding field and stator losses, is 95%and X=2.5ohms. calculate the mechanical power developed, the Armature current, back e.m.f, power angle and maximum or pull out torque of the motor

5 0
2 years ago
A growing trend in urban design is the concept of a rooftop garden. If every building in a city were to install a rooftop garden
vlabodo [156]

Answer:The Urban heat island temperature will be REDUCED.

Two Impacts of Rooftop gardens

1) provision of shade against Sunlight.

2) It helps to purify the air around the building.

Explanation: Rooftop gardens are gardens made on top of the roofs of buildings, it is a Green initiative aimed at helping to improve the overall Environment.

Rooftop gardens have several significant benefits which includes

Reduction of the surrounding temperatures and the Urban heat Island temperatures.

Rooftop gardens helps to shade the roof from the direct impacts of harsh weather conditions.

Generally, plants are known as air purifiers as they remove the excess Carbondioxide around the environment through photosynthesis, and they also help to release water vapor which will help to improve the humidity of the environment.

5 0
2 years ago
Other questions:
  • What should the resistance value be on a size 5 motor starter coil
    14·1 answer
  • Which of the following is likely to have the suffix "" after the domain name in its URL?
    7·2 answers
  • Which of the code pieces below should replace the underline?public class Test{public static void main(String[] args){Test test =
    8·1 answer
  • "A computer architect redesigns the pipeline above to enable branch prediction. When PCSrc is asserted (branch taken) IF/ID is f
    10·1 answer
  • How should employees talk to clients)
    9·1 answer
  • The car travels around the portion of a circular track having a radius of r = 500 ft such that when it is at point A it has a ve
    14·1 answer
  • 37. In ______ combination of drugs, the effects of one drug cancel or diminish
    12·1 answer
  • Pointttttttttttttssssssssssss
    12·1 answer
  • 28. What is the value of a resistor in a series circuit if you measure 0.5 amps flowing through it and 15 volts
    10·1 answer
  • If we didn’t have the spark what could not happen?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!