Goal: Create an MVC application that uses objects within objects. Pay close attention to how data is passed between routes, views, and forms in an objects-within-objects MVC setup.
Category
class? How does it relate to our Item
class?Follow along with the homework to add a Category
class with the ability to store a list of items to your ongoing to do list.
Make a program for users to catalog and organize their music. This could be a CD, vinyl or even a tape collection.
Try creating another link on the home page to take the user to a "/search_by_artist" page. Users should be able to fill out a form with an artist name to search for their collection. After submitting the form they should be taken to a page listing out all the records they own by that artist.
Then try to improve the search functionality. If the user has created a record object by "JS Bach," they should be able to search for it by typing in "bach," "Bach," or "Johann Sebastian Bach." Say the user has a record by "Bachman–Turner Overdrive" as well as one by "JS Bach." If the user searches by the name "bach" or "Bach," both the records by "JS Bach" and "Bachman–Turner Overdrive" should be displayed.
Make a program to play the Hangman game. Here's a refresher on the rules. Think carefully about the object(s) you'll use before starting. There are multiple ways to solve this problem.
Guess
by entering a letter into a form. The app should tell them if it's right or wrong, and keep track of how many guesses they have left./hangman
page. If the user has one wrong guess, show the first image. If they have 2 wrong guesses, show the second image, etc./hangman
page, display the letters they have guessed correctly so far, just like above: b _ b b _ _
/hangman
page based on whether the guess was right or wrong. Play around with changing the layout of your template file based on whether a guess is right or wrong, and whether or not the game is over.Make a game where two people can play Go Fish against each other. Here is a refresher on the rules.You will need to create a Game
class and a Player
class, which should at least hold the player's hand of cards. If you are feeling ambitious, you can also try creating a single-player mode where one user can play against the computer.
Lesson 10 of 11
Last updated more than 3 months ago.