This assignment is due by Thursday, December 08, 2022, 11:59 PM.
NO LATE SUBMISSIONS WILL BE ACCEPTED
· Instructions · Rubric ·Submission ·
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 final project is 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.
Requirements - Project Proposal
(due Tuesday, October 25, 2022 11:59 PM)
On Tuesday, October 25, 2022 11:59 PM, a short description of your project is due. You need to submit your description (as a PDF) to Canvas. This document needs to include the following sections WITH the section titles listed below.
- TITLE: Include your name, your CSCI 200 section, and a project title.
- PROBLEM DESCRIPTION: You will write a one-paragraph description of your project. This paragraph will give the reader a general idea about the program requirements and what problem you are trying to solve. For example: I 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: The data for your program consists of three requirements:
- The UML class diagrams for the classes 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 is NOT in paragraph form; instead, this section is pseudocode made up of the UML class diagrams. This section does NOT include actual C++ code, it is only pseudocode.
- How lists (either an array, vector, linked list, stack, and/or queue -- one-dimensional or multi-dimensional) will be incorporated into your program. What sets of data will need to be stored? How will they be stored - which structure(s) will you use?
- How files will be used for your data. Will you read sets of data from an external file? Will
you write the results of computations to a file? Both? You must perform the File I/O via an
ifstream
orofstream
. This task cannot be handed off to a third party library.
- PROCEDURAL DESCRIPTION: Include a brief description in pseudocode of how your main program will operate. This section should also NOT be in paragraph form. If you plan to use SFML, be sure to mention that here. This section does NOT include actual C++ code, it is only pseudocode.
- SPECIAL NEEDS/CONCERNS: Your Project Proposal
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.
- Will you need to make use of any third party libraries? If yes, what is the library and what task is it accomplishing?
The document you submit will specifically answer the following questions:
- What class will you create? What data attributes and member functions will it have?
- How will you use a data structure (array, linked-list, stack, queue) within your project?
- How will a data file be used?
You will not need to, and should not, do any coding to write this Project Proposal. The purpose of this Project Proposal is to get you to think about the initial design of your final project. (Note: we understand that the initial design you submit on Tuesday, October 25, 2022 11:59 PM is likely to change as you complete your project for the Thursday, December 08, 2022, 11:59 PM 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 three weeks for implementation. Because of the tight time period for implementation, we strongly encourage you to have most of your design plans done earlier than Tuesday, October 25, 2022 11:59 PM (to give you extra time for implementation). 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 Proposal after you submit it (e.g., too complex or too simple).
Requirements - Project Code
(due Thursday, December 08, 2022, 11:59 PM)
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
LinkedList
class,
or classes described in zyBooks,
but you must also write and use one original class.
- Your custom class must encapsulate some important data/functionality of your program. This functionality needs to be more complex than the setters/getters for the corresponding data.
- Your custom class must have some data/functions that are private.
- Your custom class must have a well-defined public interface.
- Your custom class must be defined and declared in separate files.
- Your custom class must use const, functions, data types, templates, etc. as appropriate.
Your program must use at least one list. This list needs to be either a list within your class OR a list of objects of your class type.
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 relative to your
main.cpp
file.
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 200 style guidelines.
Your program must adhere to our CSCI 200 best practice guidelines.
Requirements - Project Paper
(due Thursday, December 08, 2022, 11:59 PM)
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 200 section, and a project title.
- PROBLEM DESCRIPTION: This is the one-paragraph description of your project (from the Problem Proposal) with any necessary changes or updates.
- PROGRAM DOCUMENTATION: This section includes 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 - such as if it needs to be built with SFML ) 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. Be sure to mention what, if anything, changed from your original proposal and why those changes were necessary.
- LIST DATA STRUCTURE: Which list data structure did you choose to use? Why was this structure chosen? How did it apply to the task at hand?
- TESTS: List at least FIVE test cases that your program handles smoothly. Do not assume you have a smart user. For example, if the user enters the number of inputs that exist, then your program should not fail if the user enters -1. These tests should show that your program works properly. Given some input, the proper output is computed. Your program handles edge cases. etc. This should apply at a micro level of individual program steps - not at the macro level for the entire program. We want to be testing that the individual smaller pieces work as intended.
- 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 cannot 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.
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
There are several games with two-dimensional arrays as playing areas. Possibilities include Connect Four, Reversi (aka, Othello) and Battleship.
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.
Best Practices To Follow
- One clear and consistent coding style used (such as K&R, 1TBS, or Allman).
- Course naming scheme is followed for variable, function, class, and other identifiers. See the course style guide for more specifics.
- Code is self-documenting. Variables sensibly named, function names descriptive of their purpose.
- Keep your headers clean. Put the absolute minimum required in your headers for your interface to be used. Anything that can go in a source file should. Don't
#include
any system headers in your .h files that aren't absolutely required in that file specifically. Avoidusing namespace
in headers. - Implement the Big-3 as appropriate.
- Use
const
wherever possible:- If you declare a variable that is never modified, it should be
const
. - If your function takes a parameter and does not modify it, it should be
const
. - If a member function does not modify the callee, it should be
const
. - If you are pointing at a value that does not change, it should point at a constant value (e.g.
const T*
). - If the pointer itself is never modified, it should be a constant pointer (e.g.
T* const
).
- If you declare a variable that is never modified, it should be
- Don't leak memory. Every allocation using
new
needs to have a correspondingdelete
. - Use appropriate inheritance access. Only expose necessary members to derived classes.
- Use
override
andfinal
wherever possible and/or appropriate on derived classes. - Don't use global variables unless absolutely necessary. Instead, encapsulate them and design your interfaces effectively. If there is no way around using a global variable, be prepared to defend and justify its usage.
- Program flow uses structural blocks (conditionals/loops) effectively, appropriately, and efficiently.
- Code compiles and links without any errors or warnings.
- Program runs without any run time errors. Exceptions are properly caught, user input is validated appropriately, and program exits successfully.
Grading Rubric
Your submission will be graded according to the following rubric.
Points | Requirement Description |
25 | Project behaves as expected. |
20 | Project makes appropriate use of a class. |
15 | Project makes appropriate use of a list (array/vector/linked list/stack/queue). |
10 | Project makes appropriate use of File I/O. |
5 | Project makes appropriate use of functions. |
5 | Project makes appropriate use of constants and data types. |
5 | Project description meets requirements (due Tuesday, October 25, 2022 11:59 PM). |
5 | final.txt meets requirements. |
10 | Best practices are followed:
|
100 | Total Points |
This assignment is due by Thursday, December 08, 2022, 11:59 PM.
NO LATE SUBMISSIONS WILL BE ACCEPTED
Submission
Always, always, ALWAYS update the header comments at the top of your main.cpp file. And if you ever get stuck, remember that there is LOTS of help available.
It is critical that you follow these steps when submitting homework.
If you do not follow these instructions, your assignment will receive a major deduction. Why all the fuss? Because we have several hundred of these assignments to grade, and we use computer tools to automate as much of the process as possible. If you deviate from these instructions, our grading tools will not work.
Submission Instructions
Here are step-by-step instructions for submitting your homework properly:
-
Make sure you have the appropriate comment header block at the top of every source code file for this set. The header
block should include the following information at a minimum.
Be sure to fill in the appropriate information, including:/* CSCI 200: Final Project
* * Author: XXXX (INSERT_NAME) * Resources used (Office Hours, Tutoring, Other Students, etc & in what capacity): * // list here any outside assistance you used/received while following the * // CS@Mines Collaboration Policy and the Mines Academic Code of Honor * * XXXXXXXX (MORE_COMPLETE_DESCRIPTION_HERE) */- Your name
- If you received any type of assistance (office hours - whose, tutoring - when), then list where/what/who gave you the assistance and describe the assistance received
- A description of the assignment task and what the code in this file accomplishes.
Additionally, update theMakefile
for FP to generate a target executable namedFP
.
- File and folder names are extremely important in this process.
Please double-check carefully, to ensure things are named correctly.
- The top-level folder of your project must be named
FP
- Copy your files into
FP
(steps 2-3), zip thisFP
folder (steps 4-5), and then submit the zipped file (steps 6-11) to Canvas.
- The top-level folder of your project must be named
- Using Windows Explorer (not to be confused with Internet Explorer), find the files
named
main.cpp, Makefile, *.hpp, *.h, *.cpp, final.txt
.
STOP: Are you really sure you are viewing the correct assignment's folder? - Now, for FP, right click on
main.cpp, Makefile, *.hpp, *.h, *.cpp, final.txt
to copy the files. Then, return to theFP
folder and right click to paste the files. In other words, put a copy of your homework'smain.cpp, Makefile, *.hpp, *.h, *.cpp, final.txt
source code into theFP
folder.
STOP: Are you sure yourFP
folder now has all your code to submit?
- Now, right-click on the
"FP"
folder.- In the pop-up menu that opens, move the mouse
"Send to..."
and expand the sub-menu. - In the sub-menu that opens, select
"Compressed (zipped) folder"
.
STOP: Are you really sure you are zipping aFP
folder with amain.cpp
file in it?
- In the pop-up menu that opens, move the mouse
- After the previous step, you should now see a
"FP.zip"
file.
- Now visit the Canvas page for this course
and click the
"Assignments"
button in the sidebar.
- Find FP, click on it, find the
"Submit Assignment"
area, and then click the"Choose File"
button.
- Find the
"FP.zip"
file created earlier and click the"Open"
button.
STOP: Are you really sure you are selecting the right homework assignment? Are you double-sure?
- WAIT! There's one more super-important step. Click on the blue
"Submit Assignment"
button to submit your homework.
- No, really, make sure you click the
"Submit Assignment"
button to actually submit your homework. Clicking the"Choose File"
button in the previous step kind of makes it feel like you're done, but you must click the Submit button as well! And you must allow the file time to upload before you turn off your computer!
- Canvas should say "Submitted!". Click "Submission Details" and you can download the zip file you just submitted. In other words, verify you submitted what you think you submitted!
In summary, you must zip the "FP"
folder
and only the "FP"
folder, you must submit the correct zip file for this
homework, and you must click the "Submit Assignment"
button. Not doing these steps is like bringing your
homework to class but forgetting to hand it in. No concessions will be made for
incorrectly submitted work. If you incorrectly submit your homework, we will not be able to
give you full credit. And that makes us unhappy.
This assignment is due by Thursday, December 08, 2022, 11:59 PM.
NO LATE SUBMISSIONS WILL BE ACCEPTED