FANDOM


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!

  1. 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.
  2. Add an author property to each book, and display the author below the title.
    Project Bookshelf
  3. 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?)
  4. 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.
  5. 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.

Honor Code

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":


☀ All Khan Academy content is available for free at: www.khanacademy.org

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.