A14-Sampler Project

Table of Contents


  • Write a program that demonstrates what you have learned about C++.
  • Continue to learn how to code classes, objects, vectors and files
  • Start preparing for the final exam.

Academic Honesty

Read the Scholastic Honesty Policy and Assignment Integrity policies of the syllabus. Here are some clarifications for this particular assignment:

  • You are expected to work alone on this project to show what you have learned about C++.
  • You may not give a copy of your code to another person until after the due date for the project.
  • You may not look at another person's code until after the due date for the project.
  • You may get help from people, such as tutors, if you get stuck, but only if they do not show or tell you the code to type.
  • Do not copy or modify code from the internet or other sources without attribution. Any copied code should be less than 10 lines. Copying code from the instructor's lesson examples without attribution is allowed.

Project Introduction

During this project, you will write a program that demonstrates what you have learned about C++. The theme or type of program is up to you except the project cannot be any of the following:

  • Job list manager
  • Credit card manager
  • Tic-Tac-Toe game
  • Song playlist
  • Movie listing

The chosen topic must be respectful of others and appropriate for a family-oriented audience. Be sure you have covered all topics listed in the specifications.

Project Ideas

The following project ideas are suggestions to help you get started. Your project is NOT limited to these ideas.

  • Article database (research, news, etc.)
  • Astronomy databases and simulations (except those prohibited above)
  • Astrology simulations
  • Bank account tracking
  • Battleship game
  • Budget planning
  • Card games
  • Chemical elements
  • Data encoding or compression
  • Database programs (store and retrieve selected data)
  • Disease database
  • Job listing
  • Fortune tellers
  • Game database
  • Investment tracking and analysis
  • Library book tracker
  • Madlibs games
  • Medicine database
  • Nucleic acid database
  • Personal finance tracker
  • Physics databases and simulations
  • Rental property tracking
  • Stellar catalog
  • Solar system catalog
  • Stock portfolio tracking

Project Specifications

Develop an object-oriented computer program illustrating the following features of the C++ language. Code from assignments may be reused, but must be applied to a different application than the original assignment. The numbers in parenthesis are the point value for successfully using the feature, as described in the grading criteria.

  1. Do NOT use global variables (-10 if you do), create a prohibited project (-20 if you do) or use inappropriate material (-5 per item if you do).

    Global constants are acceptable.

  2. Construct one or more objects from at least one class that you wrote and make use of the objects in a meaningful way. (6)

    Each class must have two or more private member variables and three or more member functions. Your class may NOT be named the same, or even close to, any we did in class or for homework, including:

    • Product
    • Car
    • Cat
    • Dog
    • Job
    • MyRectangle
  3. Code and use these control structures:
    1. while or do-while loop (2)
    2. for loop (2)
    3. if or if-else (2)
  4. Code and call these types of functions, besides constructors and main():
    1. void return type (2)
    2. non-void return type (2)
    3. Pass-by-value parameters (2)
    4. Pass-by-reference parameters (2)
  5. Code and call one or more overloaded functions. (2)

    List at least two line numbers in the report to identify both versions of the overloaded function. Also, your project must call both functions. An overloaded constructor does NOT meet this specification.

  6. Code and call one or more overloaded constructors. (2)

    List at least two line numbers in the report to identify the versions of overloaded constructor. Also, your project must construct objects using all the constructors.

  7. Declare one or more vectors and access elements of the vectors. (4)
  8. Make use of files including the following:
    1. Read from a text file using ifstream (3)
    2. Write to a text file using ofstream (3)
    3. Use of fail() whenever a file is opened (1)
    4. Use of stream parameters in a function definition you wrote (1)
  9. Use of the setw() manipulator to format output. (1)
  10. Use of the setprecision() manipulator to format output. (1)
  11. A project report as described below (4)
  12. Your project code must compile correctly as described in the Grading Criteria section below (4)
  13. Your project code must function correctly as described in the Grading Criteria section below (10)

    Note: you must demonstrate your project to the instructor during the scheduled class time or you will receive a 0 for functionality.

  14. Your project code must follow all documentation requirements as described in the Grading Criteria section below (4)

You must present your project to the instructor on or before the scheduled day to receive full credit. See Project Presentation for more information.

Extra Credit

The following are worth extra credit points:

  1. Turn in and present your completed project one class meeting or more earlier than the due date. (2 points)
  2. Develop a graphics-based application (2 points)
  3. Code a function that makes a recursive call. (2 points)
  4. Code a vector of objects for a class that you wrote and process the vector in a for-loop and making use of the size() function. (2 points)
  5. Write and call a function named drawShape() that contains nested loops (2 or more loops, one inside another) that displays a shape in your program. The shape must be one we have not used in a lesson exercise of the course. (2 points)
  6. Write and call a sorting function that arranges items in order using a known algorithm and apply it to a vector. Name your function sortXXX() where XXX is the algorithm. State your source for the algorithm in your "README.txt" file. (2 points)
  7. Create HTML documentation for your program using Doxygen and submit the documentation in a zip file. (1 point)
  8. Use your imagination and code C++ features not covered in this course -- be sure to clearly identify your creative features and state in your README.txt where you got the extra credit idea or feature. (0 to 4 points)
    1. 0: Extra credit feature is trivial, does not work or source is not stated in README.txt
    2. 1: Extra credit is simple and works
    3. 2: Two simple extra credit features or one complex or imaginative use of a feature
    4. 3: Three simple features or one simple features and one complex or imaginative use of a feature
    5. 4: Four simple features, two complex or imaginative uses of a feature, or some combination

Make certain that your README.txt file lists any extra credit attempted and the file and line number of the extra credit where appropriate. Without the file and line number I may not see the extra credit.

Project Report

The final report is an enhanced README.txt file. Start with the usual README.txt information but add the following:

  • Brief introduction describing the purpose of your project and application
    • One paragraph is sufficient
  • A description of how to use your program
  • A list of the specifications with a specification number, short specification description, file name, line number and other information as needed whether you met the specification or not.

    If you do not list the specification, with a specification number, short specification description, file name, and line number, then you will not get credit. One example is sufficient though some examples, like overloaded functions, require two line numbers.

  • A list of any extra-credit features

For an example project report see README14.txt.

The report can be as short as 1-2 pages. Provide a paper copy of the report to the instructor before presenting. Turn in the report as your README.txt file.

Project Presentation

  • You must demonstrate your project on the assigned day, but not necessarily in front of the class
    • Will require screen sharing
  • When everyone else is done, you may present it to the instructor individually
    • In another Zoom meeting room
    • Will use a waiting room to limit access
    • When its your turn, the insturctor will allow you into room
  • Make certain you upload your project to Canvas before class
  • Plan on keeping the presentation to 5 minutes or less.

Suggested Presentation Flow

  1. State your name and your project's name.
  2. Briefly state your program's purpose.
  3. Compile your source code.
  4. Demonstrate your program, explaining features and source code as you go including:
    • Show the file that your program reads from and writes to
    • If implemented, show recursive function calls
    • Show creative code features
    • Show and explain source code when requested

    Feel free to refer to or display your written report during the presentation. Show the file that your program reads from and writes to. Point out as many of the cool features as possible so we can all admire them.

  5. Summarize the project.

    When the demonstration is over, or your time is up, then quickly summarize the program's purpose. Then pause for about 10 seconds to give us a chance to applaud!

Lab Exercises

Keep doing the CodeLab exercises each week before the specified due date while you work on your project. Refer to the assigned reading for the next lesson to help you understand the problems. Use the online lecture notes for more information as the notes become available.

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 course information page.

Required Features

Points as shown in parentheses for each demonstrated feature in the specifications. (38 points)

Program Compilation (as demonstrated)

  • 4: Source code compiles with no errors or warnings
  • 3: Source code compiles with 1 warning
  • 2: Source code compiles with 2 warnings
  • 1: Source code compiles with 3+ warnings
  • 0: Does not compile or wrong file turned in

Functionality (as demonstrated)

  • 10: Demonstrates mastery of the assignment
    • Has extra features or demonstrates techniques beyond the assignment
    • Applies concepts from the lesson(s) appropriately
    • Meets all specifications (see above) with particularly elegant solutions
    • No errors encountered during operation
    • All test cases pass
  • 8: Has all the functionality expected of the assignment
    • Demonstrates many techniques from the lesson
    • Meets all specifications (see above)
    • Implementation seems more complicated than necessary.
    • May have one minor error
    • All test cases pass
  • 6: Has most of the functionality expected of the assignment
    • Demonstrates some techniques from the lesson
    • Meets all but one of the specifications (see above)
    • Implementation seems excessively complicated.
    • May have 2-3 minor errors
    • All but one test case passes
  • 4: Has some of the functionality expected of the assignment
    • Demonstrates some techniques from the lesson
    • Meets at least 1/2 of the specifications (see above)
    • Implementation seems excessively complicated.
    • May have more than 3 minor errors
    • At least 1/2 of all test cases pass
  • 2: Serious functional problems but shows some effort and understanding
    • Meets less than 1/2 of the of the specifications (see above)
    • Has a major error or many minor errors
    • Implementation seems very convoluted
    • Demonstrates few techniques from the lesson
    • Less than 1/2 of all test cases pass
  • 0: Does not execute or was not demonstrated by the specified time

Programming Style

  • 4: Code is well-documented
  • 3: Code has minor documentation errors
    • Has 1 documentation error
  • 2: Code has some documentation errors
    • Has 2-3 documentation errors
  • 1: Code has many documentation errors
    • Has more than 3 documentation errors
  • 0: No apparent attempt to document code

Report and Presentation

  • 4: Project is presented and reported clearly and completely
    • Student presents information in a logical and interesting sequence
    • All requirements of the project were presented
    • Written report was given to instructor before presentation
    • Report is well-written and grammatically correct
  • 3: Project presentation or report has minor problems
    • Student presents information in a logical sequence
    • All but one of the requirements were presented
    • Some minor reporting requirements are missing
    • Report contains spelling errors, but is otherwise clearly written
  • 2: Project presentation or report has significant problems
    • Audience has difficulty following presentation because student jumps around
    • At least 1/2 of the requirements were presented
    • At least 1/2 of the reporting requirements were turned in
  • 1: Project presentation or report is unclear or incomplete
    • Audience cannot understand presentation because there is no sequence of information
    • Less than 1/2 of the requirements were presented
    • Less than 1/2 of the report was completed
  • 0: No report or not presented at the specified time
  • -2: Lesson exercises are not zipped separately before being submitted

Nominal Maximum Score: 60, plus extra credit


Submit your assignment following the instructions for homework. Do not turn in the in-class exercises. If you decide you must turn in the in-class exercises, create a folder named "exercises" (without the quotes) and place all your exercises from lesson 13 and 14 into this folder. Then zip the folder into a single archive file. CodeLab is submitted automatically.

Include the following items for grading:

  1. README.txt file containing the project report
  2. All source code files for your project (.cpp and .h files you wrote)
  3. Any data files required
  4. A Makefile if needed to compile your project

Turning in lesson exercise files is optional as described above. If you decide to turn them in, please put them into a seperate folder named "exercises" and turn in the zipped folder.

You must submit all the files needed to make your project function properly. Do not assume that the instructors has any files. Your assignment must work as submitted.

Provide a paper copy of the README.TXT report to the instructor before presenting your project.

Submit your project report as the README.txt file. Do NOT submit any Word files, as the instructor does not want any bloated files or viruses.

Last Updated: May 06 2020 @00:43:09