forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.py
31 lines (25 loc) · 742 Bytes
/
book.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Book:
def __init__(self, isbn: str, title: str, author: str, publication_year: int):
self._isbn = isbn
self._title = title
self._author = author
self._publication_year = publication_year
self._available = True
@property
def isbn(self) -> str:
return self._isbn
@property
def title(self) -> str:
return self._title
@property
def author(self) -> str:
return self._author
@property
def publication_year(self) -> int:
return self._publication_year
@property
def available(self) -> bool:
return self._available
@available.setter
def available(self, available: bool):
self._available = available