CSCI 261 - Programming Concepts (C++)

Fall 2017 - Assignment 7 - Magic Item

Quick Links: Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |
This assignment is due by Tuesday, November 14, 2017 11:59 PM.
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. You can use SFML if you'd like. 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 three other member functions. One of these other functions should 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 and CSCI 261 section number.


Grading Rubric


Your submission will be graded according to the following rubric.

Points Requirement Description
2 All code submitted properly
6 Labs completed
16 Original class created with at least two data members and at least three member functions that are not a constructor or getter/setter
3 Functional requirements met above
2 (1) Comments used (2) Coding style followed (3) Appropriate variable names, constants, and data types used (4) Instructions followed
29 Total Points


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.

From your Cloud9 workspace, right click on the A7 folder in your workspace tree. Select "Download" from the pop-up menu. This will download a file called A7.zip to your computer. It contains all the files of your A7 folder (therefore Lab7A, Lab7B, Lab7C, Assignment7). Now in Canvas, go to Assignments > A7. Upload your A7.zip file you just downloaded. And voila! Easy peasy.



This assignment is due by Tuesday, November 14, 2017 11:59 PM.
Last Updated: 11/05/17 20:15


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0