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
On Saturday, December 31, the company's owner provided ten hours of service to a customer. The company bills $100 per hour for s
pentagon [3]

Answer:

Explanation:

Answer:

31.12. Accounts Receivable a/c              Dr.    1000

                       To Service Revenue                         1000

         10 x 100 = 1000

8 0
3 years ago
An experiment is performed to determine the boiling characteristics of a special coating applied to the exposed surface. Under s
Dmitry [639]

Answer:

hello your question incomplete attached below is the complete question and detailed solution

Answer : Csf = 0.0131

Explanation:

Attached below is the detailed solution

Given data :

ΔTe = 17.1⁰c calculated as ;Ts - Tsat = ( 117.1 - 100 )

Pe = 957.9 kg/m^3

Cp1e = 4217 j/kgk

<em>U</em>e = 279 * 10^-6 n. s / m^2

Pre = 1.76

hfg = 2.257 * 10^6 J/kg

Pv = 0.5955 kg/m^3

б = 0.0589 N/m

q" = 664 * 10^3 w/m^2 ( calculated )

Input these values into equation 1 as contained in the detailed solution

Csf = 0.0131

3 0
3 years ago
1.-¿Cómo actuaba el virus Miguel Ángel?
Black_prince [1.1K]
I don’t know so sorry about that
4 0
3 years ago
Select the correct answer.
andrezito [222]

Answer:

it is A. balance

Explanation:

6 0
3 years ago
You can divide a surface by drawing a line through it
SpyIntel [72]

Answer:

T

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which option should the engineers focus on as they develop the train in the following scenario?
    12·1 answer
  • If you're carrying a load that extends beyond the sides of your vehicle, you don't need to clearly mark it unless it extends mor
    13·2 answers
  • "Hint: A backslash \ in a string acts as an escape character, such as with a newline \n. So, to print an actual backslash, escap
    6·1 answer
  • The contractor was awarded a contract to construct a parking lot for a small shopping center. The contractor plans to use single
    13·1 answer
  • 12.48 Moist air enters a device operating at steady state at 1 atm with a dry-bulb temperature of 55°C and a wet-bulb temperatur
    15·1 answer
  • What was the opening price of Dow Jones Industrial Average on July 06,2017 in the format of XXXXX.XX?
    15·1 answer
  • a person who agrees to purchase the finished products or services presented with the prescribed or correct features​
    5·1 answer
  • What energy type is represented in the picture?
    6·2 answers
  • 1.The HCF of 15 and 20?<br>2.5!=??...????​
    9·2 answers
  • A landfill that has a thick plastic liner, compacted clay, impervious layers, monitoring wells, and is used for hazardous waste
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!