CSCI 261 - Programming Concepts (C++)

Summer 2018 - A9 - Bubble Bobble

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

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |
This assignment is due by Tuesday, June 19, 2018, 11:59 PM.



The Purpose



The purpose of this assignment is to give you practice animating objects and interacting with them.


The Goal



You will need to complete Lab9B before beginning this assignment.

We want to replace our single Bubble object with a vector of Bubbles. Before your draw loop, create a vector of five Bubbles. Give each Bubble a random starting position between 100 and 400 for X and Y and a random direction between 0.0 and 2.5 (think how to do this with rand() to get a range within a double value. We don't want the values to be 0, 1, 2. It should be possible for 0.7 or 1.3 or 2.4 to be the random value set). Additionally, give each Bubble a random radius between 10 and 50. Lastly, give each Bubble a random color so we can tell them apart.

Inside our draw loop, we now need to draw all the Bubbles in our vector. After our event handling, we'll then need to update the positions of all the Bubbles in our vector. You should now see five Bubbles bouncing around the window. Excellent. Let's have the user interact.

When the user clicks the left mouse button, we want to create a new Bubble at the location where the user clicked. This new Bubble should have the same starting properties that our original five Bubbles did. After the user clicks the first time, we should see six Bubbles moving around the window. A second click, seven Bubbles. And so forth as the user continues to click. (Hmm, how can we keep track of these new Bubbles?)

We may get to the point where there are too many Bubbles on the screen. If the user presses the 'd' or 'D' key, then we want to delete the last Bubble that was added to the window. Obviously if there are no Bubbles in the window, then pressing 'd' should do nothing.

If the user starts your program, clicks twice, then presses 'd' three times, we should be seeing four Bubbles on the screen.


Grading Rubric


Your submission will be graded according to the following rubric.

PointsRequirement Description
2 All code submitted properly.
8 All labs completed and submitted
12 Set of Bubbles bounce around the screen.
4 User can add/remove Bubbles.
3 Functional requirements above met.
2 (1) Comments used
(2) Coding style followed
(3) Appropriate variable names, constants, and data types used
(4) Instructions followed
31 Total Points

This assignment is due by Tuesday, June 19, 2018, 11:59 PM.


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.


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. And that makes us very unhappy. And when we're unhappy, we give penalties. Thus, make us happy.


Submission Instructions



Here are step-by-step instructions for submitting your homework properly:
  1. File and folder names are extremely important in this process. Please double-check carefully, to ensure things are named correctly.
    1. The top-level folder of your project must be named Set9
    2. Inside Set9, create 5sub-folders that are required for this Set. The name of each sub-folder is defined in that Set (e.g.,L9A, L9B, L9C, L9D, and A9).
    3. Copy your program main.cpp and supporting files into the subdirectories of Set9 (steps 1-2), zip this Set9 folder (steps 3-4), and then submit the zipped file (steps 5-11) to Canvas.
    4. For example, when you zip/submit Set9, there will be 5 sub-folders called L9A, L9B, L9C, L9D, and A9 inside the Set9 folder, and each of these sub-folders will have a file called main.cpp and nothing else.

  2. Using Windows Explorer (not to be confused with Internet Explorer), find the file named "main.cpp" located inside the folder for the particular lab or homework assignment you will submit. For example, find main.cpp in your Z:\CSCI261\Set9\ folder. Repeat this for all supporting files.

    STOP: Are you really sure you are viewing the correct assignment's folder?

  3. Now, for A9, right click on the main.cpp to copy the file. Then, return to the Set9/A9 folder and right click to paste the file. In other words, put a copy of your homework's main.cpp source code and supporting files into the Set9/A9 folder.

    Follow the same steps for L9A, to put a copy of your lab's main.cpp and supporting files into the Set9/L9A folder. Repeat this process for Set9/L9B, Set9/L9C, Set9/L9D.

    STOP: Are you sure your Set9 folder now has all your code to submit?

  4. Now, right-click on the "Set9" folder.
    1. In the pop-up menu that opens, move the mouse "Send to..." and expand the sub-menu.
    2. In the sub-menu that opens, select "Compressed (zipped) folder".

    STOP: Are you really sure you are zipping a Set9 folder with sub-folders that each contain a main.cpp file in it?

  5. After the previous step, you should now see a "Set9.zip" file.

  6. Now visit the Canvas page for this course and click the "Assignments" button in the sidebar.

  7. Find Set9, click on it, find the "Attach file" area, and then click the "Browse My Computer" button.

  8. Find the "Set9.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?

  9. WAIT! There's one more super-important step. Click on the blue "Submit" button to submit your homework.

  10. No, really, make sure you click the "Submit" button to actually submit your homework. Clicking the "Open" 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!

  11. Canvas should say "This assignment is complete. Click OK to review the results.". Click "OK" and view the files within the zip file you submitted. In other words, verify you submitted what you think you submitted!
In summary, you must zip the "Set9" folder and only the "Set9" 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" 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, June 19, 2018, 11:59 PM.

Last Updated: 05/23/18 08:45


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