Lab 13: Breakout & Review
- Due No Due Date
- Points 1
- Submitting a file upload
- File Types html
Overview
This lab provides exercises to help you review the material we've covered this semester. If you complete those exercises, you will have the opportunity to follow a tutorial to make a Breakout game in HTML and JavaScript.
Part 1: Review exercises
Work on the following zyLabs:
- zyLab 2.34: Input: Mad Lib
- zyLab 3.27: Name format
- zyLab 4.18: Checking for integer string
- zyLab 5.19: Middle item
- zyLab 6.30: Acronyms
Part 2: Breakout
In this part, you will follow a tutorial to build a game of Breakout in JavaScript and HTML. While you could just copy and paste all of the code and have it work, the point of this part is to help you realize that your experience programming in C++ will help you to read code written in other languages. JavaScript is quite different from C++ in many respects, but it's also very similar in others. Things like variables, if statements, loops, assignments, and functions should look familiar to you, even if the syntax is different. This part is really just for fun, so enjoy the process and the final product!
Here's the tutorial Links to an external site..
Submitting
For the zyLabs, click the "Submit for grading" button when you are finished. For the Breakout tutorial, upload whatever you have at the end of lab (just the HTML file); it doesn't need to be complete, I just want to see what progress you made during the lab.
PA options
Please see the syllabus and course schedule (both on the homepage) for more information about how many programming assignments you are required to pass, due dates, etc. Of note: you do not need to attempt every or even most PAs.
PA 13.1: Pick any previous PA you haven't passed (Limit: 1)
Pick one of the previously listed PA options. You can only do one, and you can't pick an earlier version of a PA that you've already received credit for. Here they are as a reminder:
- PA 2.1: Area under the curve (can't do if you've already passed PA12.2)
- PA 3.1: Adaptive quiz
- PA 4.1: Password generator+ (can't do if you've already passed PA5.1 or PA7.2)
- PA 5.1: Password generator++ (can't do if you've already passed PA7.2)
- PA 6.1 (Advanced): Word stats (can't do if you've already passed PA7.1, 9.3, or 12.3)
- PA 7.1 (Advanced): Word stats with functions (can't do if you've already passed PA9.3 or 12.3)
- PA 7.2: Password generator++ with functions
- PA 8.1: Grid world with points
- PA 8.2 (advanced): Grid word with random layouts
- PA9.2: Palindrome detector (can't do if you've already passed PA10.1)
- PA9.3 (Advanced): Word stats with a struct (can't do if you've already passed PA12.3)
- PA10.1: Palindrome detector with a struct
- PA10.2 (Advanced): Digital Rolodex (can't do if you've already passed PA11.2)
- PA11.1: Cipher with dynamic delta
- PA11.2 (Advanced): Digital Rolodex with files
- PA12.1 (Advanced): Find outliers
- PA12.2: Area under the curve with batch mode
- PA12.3 (Advanced): Word stats with a file
When you submit, add the following above the specs that you paste at the top of your source code file:
// In fulfillment of PA13.1
Be sure to self-assess your program before submitting. Go through each of the specs and ensure that your program meets that spec. If it does, mark it with an [x]. If it doesn't, fix your program so that it does and mark the spec with an [x] before you submit.
PA 13.2 (Advanced): Digital Rolodex with sorting
Implement the Digital Rolodex (PA10.2, or 11.2), but make it so that contacts are added to the list in alphabetical order based on the name field of the Contact struct. You can use a sorting algorithm for this (make a dedicated function for it) or you can modify your add function so that it traverses the list of contacts backwards, moving each existing contact one spot towards the end until you find the spot where the new contact belongs.
Copy and paste the specs from the Digital Rolodex you start with (PA10.2 or 11.2), and add this just below those specs:
// PA Option 13.2 (Advanced)
// [ ] contacts are inserted into the list (and therefore displayed) in alphabetical
// order according to the contacts' names
Be sure to self-assess your program before submitting. Go through each of the specs and ensure that your program meets that spec. If it does, mark it with an [x]. If it doesn't, fix your program so that it does and mark the spec with an [x] before you submit.
PA 13.3 (Advanced): Find outliers with sorting
Implement PA12.1 Find outliers, but sort the list of numbers read in from the input file. To do this, pick your favorite sorting algorithm and implement it as its own function. It should handle sorting doubles. Once implemented, your program should identify outliers with both sorted and unsorted input files.
Copy and paste the specs from PA12.1 and add this just below those specs:
// PA Option 13.3
// [ ] a function is defined that sorts a list of doubles
// [ ] this function is used to sort the data read in from the input file prior to
// processing outliers
// [ ] outliers are detected regardless of the order of the data in the input file
Be sure to self-assess your program before submitting. Go through each of the specs and ensure that your program meets that spec. If it does, mark it with an [x]. If it doesn't, fix your program so that it does and mark the spec with an [x] before you submit.
PA 13.4 (Advanced): Word stats with sorted output
Implement any of the word stats PAs (PA6.1, 7.1, 9.3, or 12.3), but display the words at the end in reverse order of their frequency (most frequent at the top). To do this, implement your favorite sorting algorithm in its own function. If you are starting with a version of Word stats without structs, then your sort function will need to take the two parallel vectors as parameters and swap the corresponding elements in the words vector whenever elements are swapped in the frequency vector. If your version of Word stats uses a struct, then your sort function should take a vector of that struct type as a parameter and perform comparisons on the frequency field of each vector element, but swap entire elements.
You should sort the data before displaying it to the console.
Copy and paste the specs from whatever version of word stats you're starting from and add this just below those specs:
// PA Option 13.4
// [ ] a function is defined that sorts a words and their associated frequencies
// [ ] this function is used to sort the data before displaying it to console
// [ ] words appear at the end in reverse order of frequency (most frequent words first)
Be sure to self-assess your program before submitting. Go through each of the specs and ensure that your program meets that spec. If it does, mark it with an [x]. If it doesn't, fix your program so that it does and mark the spec with an [x] before you submit.
Submitting PAs
Submit your PA to First programming assignment, Second programming assignment, Third programming assignment, Fourth programming assignment, or Fifth programming assignment based on whether this is your first, second, etc. PA. If you are working with a partner, both of you must submit individually.
Rubric
Criteria | Ratings | ||
---|---|---|---|
Worked diligently on the lab problems
|
|
||
Submitted all materials according to the instructions
|
|
||
|