Question: Book ( class ) Properties: title ( string ) , author ( string ) , price ( float ) , quantity ( integer ) ,

Book (class)
Properties: title (string), author (string), price (float), quantity (integer), and type
(one of multiple book types: Fiction,Non-Fiction,Sci-Fi,Mystery, and Biography)
Getters: getTitle(), getAuthor(), getPrice(), getQuantity(), getType()
Setters: setPrice(newPrice), setQuantity(newQuantity)
Methods: A __repr__ method that displays information about the book
User (class)
Properties: username (string), email (string), and password (string)
Getters: getUsername(), getEmail()
Setters: setEmail(newEmail), setPassword(newPassword)
Methods: A __repr__ method that displays information about the user
Order (class)
Properties: order_id (string), user (User object), book (Book object), and quantity
(integer)
Getters: getOrderId(), getBook(), getQuantity()
Setters: setQuantity(newQuantity)
Methods: A __repr__ method that displays information about the order get the user input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!