| 2-4-A Book \'em In-Class Exercise We will do an in class group exercise regard
ID: 3585698 • Letter: #
Question
| 2-4-A Book 'em In-Class Exercise We will do an in class group exercise regarding classes. Participants will receive a point for participating; it is not usually possible to make up in-class exercises if you miss them. The exercise is considered to be at least partially lab and so will probably extend into the lab period (i.e past 10:30) 1.7 Imagine you are designing a computer system for the Laney Library. As a group, design a Book class that will be used to track our collection. You should produce the following deliverables: 1. A list of Attributes (variables) your class will have, with an ID (Name) and Type (int, string, etc.) 2. A list of Methods (functions) you will need to write 3. Answer this question: In addition to books, we also have a collection of movies to lend. Should the same class be used for both Movies and Books?Explanation / Answer
1.
class Book:
variables
name = "Python Programming"
type = "Computers"
ISBN = 1018374848
issueDate = "September 14 2017"
2.
methods --- constructor
def __init__()
def issueBook()
def returnBook()
3.
No Movies class should be separately defined as there can be attributes which are different from Book class eg ISBN .
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.