GithubHelp home page GithubHelp logo

debonx / book-rating-system Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 18 KB

Simple book rating system in Python.

License: GNU General Public License v3.0

Python 100.00%
python rating codeacademy

book-rating-system's Introduction

Book Rating System

A simple python software to analyse books and users who have read them. Thanks to addubinski

Classes

User(name, email)

Creates a user object with the following methods:

  • get_email(): returns email address
  • change_email(address): changes user email
  • read_book(book, rating=None): adds book to user and assigns a rating
  • get_average_rating(): returns the user average rating given to books
  • repr(): returns representaiton string
  • eq(other_user): checks for doubled user objects

Book(title: str, isbn: int)

Creates a book object with the following methods:

  • get_title(): returns book title
  • get_isbn(): returns book's isbn
  • set_isbn(): set book's isbn
  • add_rating(rating): assigns rating to the book
  • get_average_rating(): gets average rating given to this book
  • eq(other_book): checks if the book already exists
  • hash(): makes object hashable

Fiction(author)

Subclass of Book() with the following methods:

  • get_author(): returns author of Fiction()
  • repr(): representation of Fiction() object

Non_Fiction(subject, level)

Subclass of Book() with the following methods:

  • get_subject(): returns subject of Non Fiction
  • get_level(): returns level of Non Fiction
  • repr(): representation of Non_Fiction() object

TomeRater()

Class to analyse everything so far. Methods:

  • create_book(title, isbn): creates Book() and returns it
  • create_novel(title, author, isbn): creates Fiction() and returns it
  • create_non_fiction(title, subject, level, isbn): creates Non_Fiction() and returns it
  • add_book_to_user(book, email, rating=None): adds book to a user and gives a rating
  • add_user(name, email, user_books=None): adds a user
  • print_catalog(): prints all books added so far
  • print_users(): prints all users added so far
  • get_most_read_book(): gets the book read more times
  • highest_rated_book(): gets the highest rated book
  • most_positive_user(): returns the users with the most generous ratings

book-rating-system's People

Contributors

debonx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

book-rating-system's Issues

Summary

Rubric Score

Criteria 1: Valid Python Code

  • Score Level: 4 (Exceeds Expectations)
  • Comment(s): All code if valid and seems to work as expected.

Criteria 2: Implementation of Project Requirements

  • Score Level: 4
  • Comment(s): All requirements met.

Criteria 3: Software Architecture

  • Score Level: All classes constructed well and in line with best practices.
  • Comment(s):

Criteria 4: Uses Python Language Features

  • Score Level: 4
  • Comment(s): Python features used well

Overall Score: 16/16

Excellent job! One of the best ones I have seen, keep it up!

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.