This assignment is due by Tuesday, April 21, 2020, 11:59 PM.
As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must be provided in accordance with the course collaboration policy.
Do not forget to complete the following labs with this set: L7A,
L7B,
L7C
.
· Instructions · Rubric · Submission ·
The purpose of this homework is to give you more practice on writing your own classes.
The Goal
The goal of this homework is to create a unique class of a "magic
item", which allows the user of the "magic item" to do something and
then, perhaps, win something. Your "magic item" can (and should) have
different behaviors than the "magic items" created by your fellow
students. For example, a "magic item" may ask a riddle and, if answered
correctly, awards a potOfGold. In addition to answering a riddle, other
example behaviors are solving a math problem, answering a trivia
question, playing a slot machine, etc.
You have complete
freedom as to what this magic item does.
Be creative and have fun with this assignment. Next week, you
will see and use your magic item along with several of your classmates
so try to create the best magic item and show off your skillz. Just as
your items have prizes, there will prizes in class as well.
Examples
To illustrate this "magic item" idea, example 1 and example 2 are provided.
You are not allowed to use these "magic items" in your
main.cpp
(nor copy the example code to create your own "magic item" class
either!)
Functional Requirements
- You must declare your class in its own header file and then define your class in a corresponding source file.
- Your "magic item" class should have at least two data members and,
in addition to constructors and getter/setter functions, at least
four other member functions. One of these other functions must be
an
introduction()
function that tells the user how to use the "magic item" to win a prize. - Both files associated with your "magic item" class must include your name.
Grading Rubric
Your submission will be graded according to the following rubric.
Points | Requirement Description |
4 | All code submitted properly. |
6 | All labs completed and submitted L7A, L7B, L7C |
6 | Original class created. |
2 | Class contains at least two data members. |
3 | Class contains appropriate constructors and getters/setters. |
4 | Class contains at least four member functions beyond constructors/getters/setters. |
1 | One of the member functions is an introduction() function. |
2 | Class declared and defined in separate header and source files. |
2 | (1) Comments used (2) Coding style followed (3) Appropriate variable names, constants, and data types used (4) Instructions followed |
30 | Total Points |
This assignment is due by Tuesday, April 21, 2020, 11:59 PM.
As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must be provided in accordance with the course collaboration policy.
Do not forget to complete the following labs with this set: L7A,
L7B,
L7C
.
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. The following instructions are copied from How to Submit Homework.
Submission Instructions
- 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
Set7
- Inside
Set7
, create 4 sub-folders that are required for this Set. The name of each sub-folder is defined in that Set (e.g.L7A
,L7B
,L7C
, andA7
). - Copy your files into the subdirectories of
Set7
(steps 1-2), zip thisSet7
folder (steps 3-4), and then submit the zipped file (steps 5-11) to Canvas. - For example, when you zip/submit
Set7
, there will be 4 sub-folders calledL7A
,L7B
,L7C
, andA7
inside theSet7
folder, and each of these sub-folders will have the associated files.
- 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, YourClass.h, YourClass.cpp
.
STOP: Are you really sure you are viewing the correct assignment's folder? - Now, for A7, right click on the
main.cpp, YourClass.h, YourClass.cpp
to copy the files. Then, return to theSet7/A7
folder and right click to paste the files. In other words, put a copy of your homework'smain.cpp, YourClass.h, YourClass.cpp
source code into theSet7/A7
folder.
Follow the same steps for L7A, to put a copy of your lab'smain.cpp
into theSet7/L7A
folder. Repeat this process forSet7/L7B
,Set7/L7C
.
STOP: Are you sure yourSet7
folder now has all your code to submit?
- Now, right-click on the
"Set7"
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 aSet7
folder with sub-folders that each contain amain.cpp
file in it?
- In the pop-up menu that opens, move the mouse
- After the previous step, you should now see a
"Set7.zip"
file.
- Now visit the Canvas page for this course
and click the
"Assignments"
button in the sidebar.
- Find Set7, click on it, find the
"Submit Assignment"
area, and then click the"Choose File"
button.
- Find the
"Set7.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!
"Set7"
folder
and only the "Set7"
folder, this zip folder must have several sub-folders, you must name all these folders correctly, 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 Tuesday, April 21, 2020, 11:59 PM.
As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must be provided in accordance with the course collaboration policy.
Do not forget to complete the following labs with this set: L7A,
L7B,
L7C
.