Project 1
Due: 21:00 F 10/5

C++ Programming

A programmer is a machine for turning coffee into c++.
    -- not quite what Paul Erdös said

(Post your P1 questions/answers to the 122 Blog.)

Project Requirements

Complete the following requirements in the order given:
  1. greet-by-name.cpp. See the week 1 lab outline (Blackboard 122 coursesite > Schedule > Class Calendar > lab-outline-wk1) for how to write this program.

    Store your program as /122/p1/greet-by-name.cpp on your local host. When complete use SSH/sftp to upload it (drag-and-drop is all it takes) to your /122/p1/ folder on the remote host, shell.uoregon.edu.

  2. tipCalc.cpp. On paper, sketch out a solution for Programming Exercise 2.5, p. 64. This solution outline comprises your algorithm to solve the problem (the algorithm does not have to be turned in).

    Echo the program inputs as shown in this I/O specification:
    enter subtotal (dollars & cents): 10.00
    enter gratuity rate (whole number): 15
    
    *** results ***
    subtotal: $10.0
    gratuity rate: 15%
    gratuity: $1.5
    total: $11.5.

    The I/O spec agrees with what's shown in the book: 11.5 displays with a single digit of precision to the right of the decimal point. If you would like to format your results as $nn.nn, read about Currency Format using I/O stream manipulators. This is optional and not a requirement.

    On paper, translate your algorithm into a complete c++ program, tipCalc.cpp. Verify it by hand tracing it on several test cases (inputs). This handwritten program does not have to be turned in.

    When you are confident of your program's correctness, use Visual C++ to edit/compile/test/debug your program.

    Store your program as /122/p1/tipCalc.cpp on your local host. When complete use SSH/sftp to upload it (drag-and-drop is all it takes) to your /122/p1/ folder on the remote host, shell.uoregon.edu.

  3. Study the solution for programming exercise 2.6, p. 64. Solutions for even-numbered exercises can be downloaded from the textbook's companion website.

  4. toUC.cpp. On paper, sketch out a solution for Programming Exercise 2.7, p. 65. This solution outline comprises your algorithm to solve the problem (the algorithm does not have to be turned in).

    On paper, translate your algorithm into a complete c++ program, toUC.cpp. Verify it by hand tracing it on several test cases (inputs). This handwritten program does not have to be turned in.

    When you are confident of your program's correctness, use Visual C++ to edit/compile/test/debug your program.

    Store your program as /122/p1/toUC.cpp on your local host. When complete use SSH/sftp to upload it (drag-and-drop is all it takes) to your /122/p1/ folder on the remote host, shell.uoregon.edu.

  5. XC (eXtra Credit) Option, 5 pts added to project score: On Time Delivery.

    Late Turn-In is OK for this project only:
    It can be turned in as late as 21:00 F 10/12 w/o penalty. This will apply to project 1 only; all subsequent projects must be submitted by the original due date.

    Project 1 may be submitted for extra credit
    as late as 21:00 Mon. 10/8. Students submitting project 1 by this date will receive +5 pts for "on time" delivery.

    To receive these XC points: When you submit this project in Blackboard you must state "Extra Credit Option Completed" in the Comments section.

  6. Project Grading Rubric. This document describes how your lab instructor (GTF) will grade your project. You should assess your project using this rubric before turning in your project, to make sure you are meeting all project requirements.

  7. How to Submit your Project for Grading.

Always Echo the Input

To "echo the input" means to display the value entered by the user. Always echo program input for your reader. For example, if a program prints this:

The input string is not a palindrome. 
The output does not include the string being tested, so there is no way for the reader to determine if this is a true statement. Instead, you should Echo the input for your reader:
The input string "go hang a salami, I'm a lasagna hog" is a palindrome.