Giter VIP home page Giter VIP logo

oop-book-collection's Introduction

Code Along: OOP Book Collection

  • We'll walk through the process using OOP to create a program to manage a person's book collection

Requirements

  • Create a class BookList

  • Create another class called Book

  • BookLists should have the following properties:

    • Number of books marked as read
    • Number of books marked not read yet
    • A reference to the next book to read (book object)
    • A reference to the current book being read (book object)
    • A reference to the last book read (book object)
    • An array of all the Books
  • Each Book should have several properties:

    • Title
    • Genre
    • Author
    • Read (true or false)
    • Read date, can be blank, otherwise needs to be a JS Date() object
  • Every Booklist should have a few methods:

    • .add(book)
      • should add a book to the books list.
    • .finishCurrentBook()
      • should mark the book that is currently being read as "read"
      • Give it a read date of new Date()
      • Change the last book read to be the book that just got finished
      • Change the current book to be the next book to be read
      • Change the next book to be read property to be the first unread book you find in the list of books
  • Booklists and Books might need more methods than that. Try to think of more that might be useful.

oop-book-collection's People

Contributors

kareemgrant avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.