Project: Bookshelf is the capstone project in the objects section. In this project, users are given a program that draws a single book on a bookshelf, and adds its title and star rating. This project yields 2100 points.
Users receive the following instructions:
What are your favorite books? Make a shelf of them!
- This program only displays one book. Make an array of books (at least two of them), and use a loop to display a row of them.
- Add an author property to each book, and display the author below the title.
- Add a new property to each object to store a color, using the color command, and use that to fill each book differently. (Or maybe store an image?)
- Add a boolean property to each book (like whether you would recommend it to friends), and use a conditional inside the loop to draw something different depending on whether the boolean is true or false.
- Now add more books, and use the loop to draw more shelves down the canvas. Think about how you can use conditionals and/or the % operator to do that.
Don't want to make a bookshelf? You could also make a shelf of videos or video games, or re-create the home screen of your smartphone.
Projects on Khan Academy close with an honor code
I certify that this is all my original work. If I took any parts from elsewhere, then they were non-essential parts of the project, and they are clearly attributed at the top. I will show I agree to this honor code by typing "Yes":