Академический Документы
Профессиональный Документы
Культура Документы
1
Chapter 3 - Problems
Problems
1. Roman Numerals
2. State Abbreviations
3. Areas of Rectangles
4. Test Scores and Grade
5. Mass and Weight
6. Time Calculator
7. Sorted Names
8. Software Sales
9. Shipping Charges
10. Fat Gram Calculator
11. Running the Race
12. The Speed of Sound
13. Internet Service Provider
1. Roman Numerals
A number converter contains an integer within
the range of 1 through 10
Convert the integer into the corresponding roman
numeral
For example:
Integer Number Roman Numeral
1 I
2 II
3 III
… …
10 X
2. State Abbreviations
A state translator includes a state abbreviation
Translate the state abbreviation into its full name
as below:
Abbreviation Full Name
NC North Carolina
SC South Carolina
GA Georgia
FL Florida
AL Alabama
For example:
• The shipping charges of a 1-pound package with 500 miles is $1.10
10. Fat Gram Calculator
A fat gram calculator for a food item holds the
following information:
• Total calories in the item
• The number of fat grams in the item. Each fat gram has
9 calories
Calculate the percentage of calories from fat:
Percentage = Calories from fat / total calories
Check if the item is low in fat or not. A food item
is in this status if and only if its calories from fat
are less than 30 percent of the total calories
11. Running the Race
The problem is about determining achievement in
a three-competitor race
The race records runners’ accomplishment as
soon as they finish
Recording for each runner consists the following
information:
• The runner’s name
• An amount of time which it takes the runner to finish the
race
Determine the first runner that reaches the goal
Determine the second runner that reaches the
goal
Determine the third runner that reaches the goal
12. The Speed Of Sound
A sound meter is used for holding information
that a sound wave travels in a specific medium. It
consists of the following information:
• Medium that the wave travels in, can be air, water or
steel
• Distance that the wave travels
Calculate the mount of time it takes the wave to
travel in the medium:
Time = Distance / Approximate speed for the medium
Medium Approximate speed
Air (feet/second) 1100
Water 4900
Steel 16400
13. Internet Service Provider
The ISP provides three different packages for its
customers:
• Package A: For $9.95 per month 10 hours of access are
provided. Additional hours are $2.00 per hour
• Package B: For $13.95 per month 20 hours of access are
provided. Additional hours are $1.00 per hour
• Package C: For $19.95 per month unlimited access is
provided
A customer’s monthly bill includes the following
information:
• Package’s name (A, B or C) that the customer has been
using
• The number of hours that were used
Calculate the monthly total charge that a