CS101 @ WVU - Computer Science 101

advertisement
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
Background Information
As fuel prices have increased over the past few years, there
has been much new interest in the fuel economy of our
vehicles. Vehicles with higher fuel economy cost less to
operate and help to reduce our dependence upon foreign oil.
In the U.S., the Corporate Average Fuel Economy (CAFE)
standards specifies minimum miles per gallon (MPG) rates that each manufacturer
must meet. CAFE requirements are divided into two categories: passenger cars and
light trucks/SUVs. As of 2014, passenger cars were required to average 34.2 MPG
and light trucks 26.2 MPG [1]. Under a 2011 agreement with 13 large automakers,
the U.S. plans to steadily increase CAFÉ requirements so they will average 54.5
MPG for both passenger cars and light trucks/SUVs in 2025 [2].
Problem Statement
In this assignment, students will create a database to store and analyze fuel
economy for vehicles in the compact, midsize, large sedan, SUV, and minivan
categories from several major automobile manufacturers.
Instructions
IMPORTANT: Complete the below steps in the order they are given. Completing the
steps out of order may complicate the assignment or result in an incorrect result.
1.
Begin by creating a new Microsoft Access database named
lastname_firstname_vfep.accdb .
2.
We would like to begin by making a table to store the vehicle manufacturers.
a.
Create a table named Manufacturers to store the names of the car
manufacturers and their stock ticker symbols. Designate the ticker symbol
as primary key.
b.
Enter records for all vehicle manufacturers below.
HINT: The Manufacturers table will contain 5 records.
Manufacturer Name
Fiat Chrysler Automobiles
Ford Motor Company
General Motors Company
Toyota Motor Corporation
Honda Motor Company
Introduction to Computer Applications
West Virginia University
Manufacturer Ticker Symbol
FCA
F
GM
TM
HMC
Page 1 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
3.
We also must store information on the vehicle makes in our dataset.
a.
Create a table named Makes to store the car makes, their make
abbreviations and their manufacturer’s ticker symbol. Designate the make
abbreviation as primary key.
For the manufacturer ticker symbol, create a relationship to the primary
key of the Manufacturers table to indicate which manufacturer owns each
make. Enforce referential integrity and enable cascade updates, but
do not enable cascade deletes.
b.
Enter records into the Makes table corresponding to the below makes.
HINT: The Makes table will contain 7 records.
Make Name
Chevrolet
Dodge
Ford
Honda
Toyota
Jeep
Chrysler
4.
Make Abbreviation
CHEV
DODG
FORD
HOND
TOYT
JEEP
CHRY
Manufacturer Ticker Symbol
GM
FCA
F
HMC
TM
FCA
FCA
We need to create an additional table to store vehicle category information.
a.
Create a new table named Categories to store the car categories. Include
a separate field (other than the category) to serve as primary key.
b.
Enter records into the Categories table corresponding to the below
categories.
HINT: The Categories table will contain 5 records.
5.

compact

midsize

large

minivan

SUV
To finish adding our dataset, we must store the vehicle model information.
a.
Create a table named Models to store information on each car model
(listed below under Step 5b). Some requirements for this table appear
below.
IMPORTANT: Completely define the Models table before entering records.
Introduction to Computer Applications
West Virginia University
Page 2 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
i.
For the primary key, use an AutoNumber-type field to store an ID
number.
ii.
Using a lookup field referencing the Makes table, allow the user to
specify the make of each car model (e.g., the make of the Chrysler
200 is Chrysler). The user should be able to select the make name
(e.g., “Chrysler”) from the lookup field dropdown list.
Enable data integrity, restricting deletes, on the relationship created
by the Lookup Wizard.
iii.
Provide a field to store the model name of the car (e.g., “Dart” if the
car is a Dodge Dart).
iv.
Using a lookup field referencing the Categories table, allow the user
to specify the vehicle category. The user should be able to select the
full vehicle category name (e.g., “SUV”) from the lookup field
dropdown list.
Enable data integrity, restricting deletes, on the relationship created
by the Lookup Wizard.
v.
Provide a fixed-type number field with one decimal place to specify
the engine size in liters.
vi.
Provide a currency field with no decimal places to store the MSRP
(manufacturer’s suggested retail price) of the model.
vii.
Provide an appropriately-formatted field to store the MPG estimate.
viii. Provide a standard-type number field with no decimal places to
store the horsepower rating.
ix.
x.
b.
Create a lookup field that will allow us to specify the type of
transmission. You must provide the possible values shown below:
◊
Auto
◊
CVT
◊
Manual
Include a yes/no field to specify if the car is a hybrid.
Enter the below vehicle data into your Models table as appropriate. The
information is from 2015 model year vehicles [3]–[9].
Introduction to Computer Applications
West Virginia University
Page 3 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
HINT: The Models table will contain 23 records.
Make
Model
Category
Chevrolet
Ford
Honda
Honda
Toyota
Toyota
Chevrolet
Dodge
Ford
Chevrolet
Chrysler
Ford
Ford
Honda
Toyota
Toyota
Dodge
Honda
Toyota
Dodge
Ford
Honda
Toyota
Cruze
Focus
Civic Hybrid
Civic Sedan
Corolla
Prius
Impala
Charger
Taurus
Malibu
200 Sedan
Fusion
Fusion Hybrid
Accord
Camry
Camry Hybrid
Grand Caravan
Odyssey
Sienna
Journey
Escape
CR-V
RAV4
Compact
Compact
Compact
Compact
Compact
Compact
Large
Large
Large
Midsize
Midsize
Midsize
Midsize
Midsize
Midsize
Midsize
Minivan
Minivan
Minivan
SUV
SUV
SUV
SUV
6.
Eng.
Size
1.8
2
1.5
1.8
1.8
1.8
2.5
3.6
3.5
2.5
2.4
2.5
2
2.4
2.5
2.5
3.6
3.5
3.5
2.4
2.5
2.4
2.5
MSRP
MPG
HP
Trans.
Hybrid
$17,745
$17,225
$24,735
$18,490
$16,950
$24,200
$27,095
$27,995
$27,055
$22,465
$21,995
$22,110
$25,185
$22,105
$22,970
$26,790
$21,795
$28,975
$28,700
$20,695
$23,100
$23,445
$23,860
30
31
45
32
32
50
26
24
24
30
29
27
43
31
30
41
21
23
21
22
26
30
27
138
160
110
143
132
134
195
292
288
196
184
175
188
185
178
200
283
248
266
173
168
181
176
Manual
Manual
CVT
Manual
Manual
CVT
Auto
Auto
Auto
Auto
Auto
Auto
CVT
CVT
Auto
CVT
Auto
Auto
Auto
Auto
Auto
CVT
Auto
N
N
Y
N
N
Y
N
N
N
N
N
N
Y
N
N
Y
N
N
N
N
N
N
N
Create separate queries to provide the information requested below. Name
each query after the step in which it appears (e.g., name the query in Step 6a
as Query6A ).
Introduction to Computer Applications
West Virginia University
Page 4 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
HINT: Run your queries to test them. Make sure that they display all and only
the records that you would expect to appear.
a.
Create a query that lists all model names, their full make name, MSRP,
MPG estimate, horsepower, and whether the vehicle is a hybrid.
Sort by MSRP in ascending order.
HINT: This query will show 23 records and 6 fields.
b.
Create a query that shows each car’s full make name and model name, its
MSRP, engine size, MPG estimate, horsepower, and transmission type.
You must also create two calculated fields: one to calculate the MPG-toengine size ratio and a second to calculate the dollars-per-horsepower
ratio.
You can calculate the MPG-to-engine size ratio using the formula:
[𝑀𝑜𝑑𝑒𝑙𝑠. 𝑀𝑃𝐺]
[𝑀𝑜𝑑𝑒𝑙𝑠. 𝐸𝑛𝑔𝑖𝑛𝑒𝑆𝑖𝑧𝑒]
You can calculate the dollars-per-horsepower ratio using the formula:
[𝑀𝑜𝑑𝑒𝑙𝑠. 𝑀𝑆𝑅𝑃]
[𝑀𝑜𝑑𝑒𝑙𝑠. 𝐻𝑜𝑟𝑠𝑒𝑝𝑜𝑤𝑒𝑟]
Format the calculated fields as standard-type numbers with 2 decimal
places. Sort by horsepower in ascending order.
HINT: This query will show 23 records and 9 fields.
c.
Create a new query to list the model name, full make name, MSRP, MPG
estimates, and whether the vehicle is a hybrid.
Only display vehicles which get at least 25 MPG and are made by a
domestic manufacturer (Fiat Chrysler Automobiles, Ford Motor Company,
and General Motors Company).
Sort by make and then by model, both in ascending order.
HINT: This query will show 8 records and 5 fields.
d.
Copy Query6A to create a new query. Only display non-hybrid models.
Leave all other settings the same.
HINT: This query will show 19 records and 6 fields.
Introduction to Computer Applications
West Virginia University
Page 5 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
e.
Create a new query. Group by the full manufacturer name and display the
average MPG estimate and the average horsepower for each
manufacturer.
Format the MPG average as fixed-type number with 1 decimal place.
Format the average horsepower as a fixed-type number with no decimal
places. Sort by the MPG average in ascending order.
HINT: This query will show 5 records and 3 fields.
7.
Using the Form Wizard, create a form with subform. The main form should
display the full make name. The subform must display a datasheet with all
Models table fields.
Name the main form CarData and the subform CarDataSubform .
8.
Using the Report Wizard, create a report to show the results of Query6A.
Display all fields from the query.
View by make and sort by model name in ascending order. Use a stepped
layout and landscape page orientation. Name the report VehicleSummary .
Ensure the full widths of all columns are visible on the report.
9.
Create a table named AnalysisQuestions . This table will need to be able to
store which question is being answered and your answer to that question in
each record.
Answer four of the five below questions, one question per record. Specifically
indicate the question you are answering for each record.
a.
What sort of relationship exists between car prices (MSRPs) and fuel
economy (MPG) estimates? Note that hybrid cars will affect this
relationship somewhat.
b.
What sort of relationship exists between engine size, MPG estimates, and
horsepower?
Introduction to Computer Applications
West Virginia University
Page 6 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
c.
Pick and identify one of the pairs of hybrid/conventional vehicles
(Ford Fusion, Honda Civic, or Toyota Camry). For that car, assume you
get fuel efficiency the same as its rated MPG estimate.
Next, determine roughly how many miles you drive each year. If you
drive less than 5,000 miles per year, use the figure of 15,000 miles per
year. Using the national average regular gas price available from the
Energy Information Administration
(http://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_nus_w.htm) and the
distance you drive annually, calculate how much you would spend on
gasoline each year for each car. How long would it take for the gasoline
savings to recoup the increased purchase price of the hybrid?
Based on the cost information and any other factors you feel are
appropriate, do you think that a hybrid vehicle is a worthwhile choice?
Explain your decision.
d.
There has been much interest recently in plug-in hybrid vehicles which
can run on electric power much or all of the time. Road funding largely
comes from gasoline taxes currently. How would plug-in hybrids affect
road funding? What sort of alternative funding mechanisms might be
used to compensate for the changes?
e.
If a large number of people were to switch to hybrid vehicles, what effect
might this have on fuel prices? What impact could there be on the costeffectiveness of the hybrids themselves?
10. Run the Compact and Repair Database utility on your database. Ignore any
errors you receive when running the utility.
Grading Rubric
This assignment is worth 50 points and will be graded based upon the listed
components. Instructors may adjust point values as they deem appropriate.
Steps 2a-b
Steps 3a-b
Steps 4a-b
Step 5a
Step 5b
4 points total
2.5 points total
2.5 points total
5 points
3.5 points
Steps 6a, 6b, 6c and 6e
Step 6d
Step 7
Step 8
Steps 9a-e (pick 4 of 5)
3.5 points each
2.5 points
3 points
3 points
2.5 points each
Acknowledgments
The image in the introduction appears courtesy of Brian M. Powell [10].
References
[1] “December 2014 Summary of Fuel Economy Performance.” National Highway
Traffic Safety Administration, Dec. 2014.
Introduction to Computer Applications
West Virginia University
Page 7 of 8
Version 22.0
Modified 10/5/2015
HOMEWORK INSTRUCTIONS
Homework #4
Vehicle Fuel Economy Problem
[2] “Obama Administration Finalizes Historic 54.5 MPG Fuel Efficiency Standards.”
Aug. 28, 2012.
[3] “Edmunds.com,” Sep. 30, 2015. Available: http://www.edmunds.com/.
[4] “Chevrolet,” Sep. 30, 2015. Available: http://www.chevrolet.com/.
[5] “Chrysler,” Sep. 30, 2015. Available: http://www.chrysler.com/en/.
[6] “Dodge Official Site,” Sep. 30, 2015. Available: http://www.dodge.com/en/.
[7] “Ford,” Sep. 30, 2015. Available: http://www.ford.com/.
[8] “Honda Cars,” Sep. 30, 2015. Available: http://automobiles.honda.com/.
[9] “Toyota Official Site,” Sep. 30, 2015. Available: http://www.toyota.com/.
[10] B. M. Powell, 2004 Dodge Stratus at Shenandoah National Park. 2005.
Introduction to Computer Applications
West Virginia University
Page 8 of 8
Version 22.0
Modified 10/5/2015
Download