FINAL PROJECT
Each week this semester, you have been doing labs and homework assignments that emphasize specific aspects of the C++ programming language. For the last few weeks of the course, you will make use of these language skills in the context of a larger, more realistic project. The goals of this project are:
- To engage in a project which is tailored to your particular interests.
- To have additional experience using the programming constructs covered within the scope of this course.
- To take responsibility for designing and producing a large program, thereby gaining knowledge and understanding of the entire software development process.
The assignment is somewhat open-ended. You may choose to write a program that plays a game, reads large data files and does a complex calculation with the data, or anything in between. Some detailed requirements are given below, so please read this document carefully.
PAIR PROGRAMMING
For this project, you may choose (not mandatory) to work with a partner using the pair programming technique. In the pair programming technique, two programmers work together on one computer. One is designated as the driver and writes the code; the other is designated as the navigator and reviews each line of code as it is typed. The two programmers switch roles frequently. For this lab, the programmers should switch roles at least every fifteen to twenty minutes.
Pair Programming is an element of a software development methodology called extreme programming, where code is being reviewed continuously by the navigator. Many companies, including Facebook, Twitter, and Groupon, sometimes use pair programming in their code development. In fact, in industry, it is more likely for a programmer to work in a pair or a team instead of alone. We encourage you to give pair programming a try!
You may choose a partner from a different section, but both of you must be able to attend the same section during the last few class meetings (as these meetings will be devoted to working on the project). Additionally, you should be sure your schedules align such that you will be able to meet outside of class three or four times over the last few weeks of the semester.
- Remember, with the pair programming technique, both programmers must be present at all times when working on the assignment. Thus, consider your schedules when deciding to work as partners!
- You may choose a partner from a different section but, again, both programmers must be present at all times when working on the assignment.
- If you choose to work with a partner, only one
student in the partnership should submit the finished work; furthermore,
this submission must have both your names
and usernames in the
header comment of your
main.cpp
file. - There will be a 50% penalty if both students submit the same work! This causes extra, unnecessary work for our grader, so please do not do it.
- There will be a 50% penalty if both names and
usernames are not in the header comment
of your
main.cpp
file. This again causes extra, unnecessary work for our grader (as the grader may need to contact you), so please do not forget to do it.
Note the requirement in the last step to include your usernames in the header comment!
Reminder:
Pair programming is not the same
as team programming.
Both programmers must be present at
all times when working on the project. There will be
a 50% penalty if the instructors discover that
a pair has broken this policy.
REQUIREMENTS
Project Definition (due November 20th, in class)
- On November 20th, a short description of your project is due. You should
submit your description (on a single typed sheet of paper) to your instructor
during class. (If you have a partner, both you and your partner
should submit
your description.) This document should include the following sections WITH
the section titles listed below:
- TITLE: Include your name, your CSCI 261 section, your partner's name (if you have a partner), your partner's CSCI 261 section, and a project title.
- PROBLEM DESCRIPTION: You should write a one-paragraph description of your project. This paragraph should give the reader a general idea about the program requirements and what problem you are trying to solve. For example: We will be creating a program that calculates the optimum pair of gears that should be selected on a bicycle, given a degree of incline and current velocity. Users select the type of bike, specify their speed, pain threshold and degree of incline. The program then informs the user of the front and rear gears that should be selected. But wait, there's more! We then animate this on the screen to illustrate the bike as it climbs or descends a hill. Whee!
- DATA DESCRIPTION: This is basically the header file for the class you will be creating for your program. Be sure to include comments to describe what your data members and member functions will do. This section should NOT be in paragraph form; instead, this section should look similar to a .h file (in the sense you should list data members and functions you plan for your class).
- PROCEDURAL DESCRIPTION: Include a brief description in pseudocode of how your main (driver) program will operate. This section should also NOT be in paragraph form. If you plan to use SFML, be sure to mention that here.
- SPECIAL NEEDS/CONCERNS: Your Project Definition should mention any special needs or concerns that the instructor should know about. Will you need extra help on a particularly difficult idea that you will have to conquer in order to make this project work? If you're addressing a specific problem for a non-CS major, you may need to get advice from someone within that department.
- The document you submit should answer the following questions:
- What class will you create? What data attributes and member functions will it have?
- How will you use an array (or vector) within your project?
- How will a data file be used?
- You do not need to do any coding to write this Project Definition. The purpose of this Project Definition is to get you to think about the initial design of your final project. (Note: we understand that the initial design you submit on November 20th is likely to change as you complete your project for the December 9th due date.)
- NOTE: You have a bit of time to decide upon your topic and a big picture of your design, but then only over about two weeks for implementation (due to Thanksgiving break). Because of the tight time period for implementation, we strongly encourage you to have most of your design plans done earlier than November 20th (to give you extra time for implementation). In fact, you are welcome to submit your project description for feedback earlier than November 20th (if desired). Many previous students have said "gosh, wish I had gotten started on the final project earlier."
- Your instructor will give you feedback on your Project Definition a few days after you submit it (e.g., too complex or too simple).
- Example project descriptions from Spring 2015 are here, here and here.
Project Code (due December 9th, 8am)
- Your program must use at least one original class, written specifically for this project. You are free to use other classes we have developed during the semester, such as the Box class, or classes described in the zyBook, but you must also write and use one original class.
- This class encapsulates some important data/functionality of your program.
- This class has some data/functions that are private.
- This class has a well-defined public interface.
- Your program must use at least one array (one-dimensional or two-dimensional). This array needs to be either an array within your class OR an array of objects of your class type. If desired, you can use a vector instead of an array.
- Your program must make use of file I/O. Data may either be read
from or written to a file, or both. Please place your data file
in the same directory as your
main.cpp
file. NOTE: If you use SFML in your project, then you do not need to do file I/O. Our empty SFML project is available for you to use here. - Your program must use functions where appropriate.
- Your program must use constants where appropriate.
- Your project must make use of ample commenting. There should be enough documentation to allow another programmer to easily make modifications or enhancements.
- Your program must adhere to our CSCI 261 style guidelines.
Project Paper (due December 9th, 8am)
Create a text file called final.txt
which contains the
following sections WITH the section titles listed below. This file
is submitted with your code (see Submission instructions below).
- TITLE: Include your name, your CSCI 261 section, your partner's name (if you have a partner), your partner's CSCI 261 section, and a project title.
- PROBLEM DESCRIPTION: This is the one-paragraph description of your project (from the Problem Definition) with any necessary changes.
- PROGRAM DOCUMENTATION: This section should include a brief description of how to run your program (i.e., what the user should type and any other information a user might need to know) and also a brief description that might be used by another programmer to modify/extend your program. For example, there may be some features that you would have included in your program if you had more time. You could include a list of those features, with any thoughts you had about how they should be implemented.
- TESTS: List at least FIVE test cases that your program handles smoothly. For example, if the user enters the number of inputs that exist, then your program should not fail if the user enters -1.
- REFLECTIONS: Include at least a one-paragraph description of what you learned from this project. It might help to think about what problems you encountered, and what you would do differently if you had to do another project.
RESOURCES
While you may search on the Internet for hints as to how certain things are done in the C++ language, you should not directly copy and paste code found from resources outside our course.
That said, any resources we have used in this class from previous labs
and homework assignments are fair game for
use in your project. For example, if you need random numbers for your
project, you are welcome to copy/paste your random number generator
function (called myRand
) from
Lab 05A.
INCREMENTAL DEVELOPMENT
Now that you are designing and writing a large project from scratch, the "Incremental Build" model of software development is more important than ever before. This is a software development methodology where the model is designed, implemented, and tested incrementally, adding a little more functionality each time, until the product is finished. In other words, write a small amount of code to do one specific task, then run the program to be sure what you have done so far works. Only when you are satisfied with what you have so far do you move on to the next part of the program.
In short, implement and test small parts of your program as you work!
PROJECT POSSIBILITIES
There are numerous different project ideas possible. Here are a few examples:
Breakout
In the classic arcade game Breakout a layer of bricks lines the top third of the screen. A ball travels across the screen, bouncing off the top and side walls of the screen. When a brick is hit, the ball bounces away and the brick is destroyed. The player loses a turn when the ball touches the bottom of the screen. To prevent this from happening, the player has a movable paddle to bounce the ball upward, keeping it in play.
In this game, you might want to develop the following three classes: Paddle, Brick and Ball.
Frogger
Another classic arcade game, Frogger is a game in which the object is to direct frogs to their homes one by one. To do this, each frog must avoid cars while crossing a busy road and navigating a river full of hazards.
Classes such as Frog, Car, Truck, Log, Turtle, Crocodile, and others could be used in implementing this game.
Othello
The Tic Tac Toe program written for Homework 09 provides a good starting point to implement other games with two-dimensional arrays as playing areas. Possibilities include Connect Four, Reversi (aka, Othello) and Battleship.
Playing Cards
Several of you might be thinking about a program that plays a card game, such as Blackjack or Video Poker.
In this game, you might want to develop the following three classes: Card, Deck, and Player.
Non-Games
Finally, there is no requirement that your final project be a game. For example, if you are passionate about bike riding, you might create a program that calculates the optimum front and rear gears that should be selected on a bicycle, given a degree of incline and current velocity. Users select the type of bicycle, specify their speed, pain threshold, and degree of incline. The program then informs the user of the front and rear gears that should be selected.
Or maybe there is something you could write that would be useful for your major or other classes. Anything that meets the requirements of the project (see above) is fair game.
Other Ideas
If you have other ideas but need a bit of help with the design, please feel free to talk to your instructor or a tutor.
POINTS
Criteria | Points Possible |
---|---|
Project behaves as expected (Frogger moves and avoids objects, Othello flips tiles properly, card games follow rules, etc.) | 18 |
Project makes appropriate use of a class | 12 |
Project makes appropriate use of an array (or vector) | 7 |
Project makes appropriate use of file I/O (or SFML) | 7 |
Project makes appropriate use of functions | 7 |
Project makes appropriate use of constants and data types | 5 |
Project includes meaningful variable/function names and ample commenting for readability | 2 |
Project follows our CSCI 261 style guidelines | 2 |
Project Description (due Nov 20th) | 5 |
final.txt file (due Dec 9th) |
5 |
Project compiles and runs - if it doesn't compile and run,
it will not be graded (It is simply unacceptable to turn in a project that does not compile or run.) |
-70 |
Total | 70 |
SUBMISSION
Ideally, your project will consist of multiple files (e.g., class header,
class implementation, main, a data file). You should place
all these files in one
directory (or folder) called src
. You should also add your
file called final.txt
, which is detailed above, to the
src
directory. Then,
zip the directory to src.zip
, and submit this file.
NO late assignments will be accepted.