On This Page
Overview
Complete the following for full credit on the assignment:
- Lesson Exercises
Make sure you have completed the exercises from lesson 1.
- Getting Acquainted
Follow the Getting Acquainted Specifications to tell the instructor about your interests and skills.
- Lab exercises
After completing the Getting Acquainted Specifications, complete the lab by following the Lab Specifications listed below.
- Turn in Files
Submit your files to Blackboard as explained in the section of this document: What to Turn In.
Note: if you do not complete this assignment on time, you might be dropped from the course. However, do not rely on the instructor to drop you because he may not. You are entirely responsible for dropping any course.
^ top
Getting Acquainted Specifications
Complete the following homework specifications so we can get acquainted.
- Copy the following information headings/questions and paste them into an email, fill in the information, and send it to the instructor at the email address posted on his Web page with CS-11 and your section number in the subject line:
- Full name:
- Email address:
- Phone number:
- Grading Option (Default, letter grade or pass/no-pass):
- College major (or goal if undeclared):
- Do you meet the following recommended course requisites?
- CS-1 or equivalent? (Yes or No):
- Math 154? (Yes or No):
- Eligibility for ENGL 100? (Yes or No):
- Eligibility for READ 100? (Yes or No):
- Score received on the Readiness Assessment:
- Do you have the necessary knowledge and skills to do well in this course? (Yes or No):
- What do you think you need to do, if anything, to get ready to take this course?
- Description of any physical or learning disabilities that I should be aware of:
- What do you hope to gain from taking this course:
I suggest you copy ("CC") yourself on the email to ensure it is sent correctly.
- Complete the Readiness Assessment quiz in Blackboard. Note that this is an ungraded quiz and you are taking it only to help you determine if you have the necessary knowledge and skills to do well in this course. However, you will be graded on whether or not you take the quiz.
- Analyze and develop an algorithm for the problem described below. Record your problem analysis and algorithm in a text file named
README.txt following the instructions for submitting assignments. Add the algorithm after the other information required in the README.txt file.
- Submit your files to Blackboard as explained in the section of this document: What to Turn In.
^ top
Problem Description
Note that this is an individual assignment and not a pair-programming assignment. Thus you are expected to work on this part of the assignment by yourself. For instructions on developing an algorithm, see Lesson 1.3.5: How to Develop a Computer Algorithm.
Problem: Cost of Traveling in a Car
Assume the government decides to provide enough of a tax incentive so that you can buy a new car! We are interested in comparing each car on the cost to travel 100 miles. We want to give instructions to Hal, our younger brother, so that he can calculate the numbers for us. We want to provide Hal with the fuel efficiency of the car in miles per gallon and the cost of a gallon of gas. Following our algorithm, Hal can then calculate the cost of traveling 100 miles in the car.
Let us suppose that Hal has only learned how to add, subtract, multiply or divide two numbers at a time. Since he does not know how to calculate multiple numbers at once, our instructions to him must be very simple and detailed. No individual step can be more complicated that adding, subtracting, multiplying or dividing two numbers together. (Note: do not confuse a number with a digit. A number can have more than a single digit in it.)
In addition, suppose that Hal's memory is not very good and that he has to write everything he needs to remember on a small chalkboard. For example, he must write all the numbers we give him and the result of adding, subtracting, multiplying or dividing two numbers onto the chalkboard in order to remember the quantity.
Construct a sequence of instructions that will yield the numbers we need for a single car. Your algorithm must work for any MPG and gas price. Use only the tools available in the problem (Hal, a chalkboard, etc.). Your algorithm must be so detailed that Hal, or anyone else, can carry out the steps and arrive at the correct answer. For full credit you must:
- Provide a problem analysis that includes both a problem restatement and questions you asked about the problem, along with your answers to the questions
- Number the steps of your algorithm
- Describe clearly and succinctly in the algorithm how you get each and every input
- Describe clearly and succinctly in the algorithm how you identify the desired result (output)
- Write a correct algorithm that works for any MPG and price within the limits of the problem (Hal has no memory, simple math, etc.)
In addition, you must verify your algorithm by looking up the MPG of a car and the cost of a gallon of gas. Then run the algorithm by hand showing each step. Keep the verification separate and do NOT mix the verification with the algorithm.
^ top
Extra Credit
According to the Intergovernmental Panel on Climate Change (IPCC), human activities have substantially added to the amount of heat-trapping greenhouse gases in the atmosphere. One of the heat-trapping gasses is carbon dioxide and one of the sources of sources of carbon dioxide is burning gasoline in a car. The US Department of Energy states that each gallon of gas burned produces 20 pounds of carbon dioxide.
Modify your algorithm so that Hal writes the pounds of carbon dioxide produced from traveling 100 miles in the car, in addition to the cost. Record your solution in the README.txt file you submit for this assignment. Be sure to label your write up as Extra Credit. (2 points)
^ top
Lab Specifications
- Register for CodeLab and complete the Review Exercises for CodeLab 1. These exercises will help prepare you for the problem-solving portion of this assignment and should be completed first.
- Read the assigned reading in the textbook and then complete the Tutorial Exercises for CodeLab 1. You can look at solutions if you miss your first attempt by clicking the "Solution" tab.
- Install Cygwin or the GCC/g++ compiler on a computer system, preferably the system you will use for your homework. Here are some instructions:
For Linux systems, g++ is usually installed automatically with GCC. You can verify the installation using your installation CD.
Briefly describe your installation experience in the README.txt file you submit.
- Verify your installation by compiling and running the
hello.cpp program using one of the following sets of instructions. Turn in the executable program you create to Blackboard.
Refer to the assigned reading for the next lesson to help you understand how to compile. Also, you can use the online lecture notes for more information as the notes become available.
^ top
Grading Criteria
The instructor will evaluate your assignment using the following criteria. Each criteria represents a specific achievement of your assignment and has a scoring guide. The scoring guide explains the possible scores you can receive.
Some scoring guides have a list of indicators. These indicators are a sign of meeting, or a symptom of not meeting, the specific criterion. Note that a single indicator may not always be reliable or appropriate in a given context. However, as a group, they show the condition of meeting the criterion.
For information on grading policies, including interpretation of scores, see the syllabus page.
Lesson Exercises
- 2: All lesson exercises attempted and turned in
- 1: Some lesson exercises completed and turned in
- 0: No lesson exercises completed or turned in
Student Information Email
- 2: All the student information was provided in the email
- 1: Some student information was not included
- 0: No email received
Readiness Assessment Quiz
- 2: Readiness Assessment quiz completed
- 1: Readiness Assessment quiz partially completed
- 0: Readiness Assessment quiz not completed
Algorithm
- 1 point for a problem restatement
- 1 point for at least two questions and answers
- 1 point for numbering the steps of your algorithm
- 2 points for a correct algorithm, including clear and succinct descriptions of inputs and outputs
- 1 point for verification
README.txt File
- 2:
README.txt file submitted following the instructions
- 1:
README.txt file submitted but some information was missing
- 0: No
README.txt file submitted
CodeLab Exercises
Number completed correctly / number exercises * 8 and rounded up to the nearest integer.
Installation Exercises
- 1 point for describing your Cygwin or g++ installation in your README.txt
- 1 point for submitting
hello.exe that you compiled after installation
Total possible: 24, plus extra credit
^ top
What to Turn In
Submit your assignment to Blackboard, in the assignment folder that matches the name of this assignment, following the instructions for submitting homework. Include the following items for grading:
README.txt file
- All the exercise files from Lesson 1
- Your executable file you created in the Installation Exercises (
hello.exe on Windows, hello on Linux or Mac)
You must submit all the files needed to complete your assignment. Your assignment must work as submitted. Remember to test and double check your files before submitting them. If you make a mistake, you can resubmit up to the deadline. If you have problems uploading to Blackboard, see: How do I upload my assignment files?.
^ top
Home
| Blackboard
| Day Schedule
| Eve Schedule
Syllabus
| Help
| FAQ's
| HowTo's
| Links
Last Updated: February 21 2012 @14:42:09
|