Python代写 | CMT 202 Distributed and Cloud Computing Coursework 2

本次英国代写主要为Python图书馆管理系统相关

Assignment

You have been hired by a library to build a distributed data storage system using a
remote object paradigm that will allow one to store and access information relating to
copies of books, authors of books and users who loan copies of books.

Each author has the following two associated pieces of information which should be
stored in the system:
1. Author name.
2. Author genre which refers to the type of books written by the author (e.g. crime,
fiction).

Each book copy has the following two associated pieces of information which should
be stored in the system:
1. Book author.
2. Book title.
Note, multiple copies of a single book can exist in the system.

Each user has the following one associated piece of information which should be
stored in the system:
1. User name.

Design and implement the above distributed data storage system using a remote
object paradigm which allows library employees to perform the following twelve
tasks:

Task 1
Add a user to the system. Implement this using a method with the following header:
def add_user(self, user_name)

An example of calling this method is:
library_object.add_user(“Allen Hatcher”)

Task 2
Return all associated pieces of information relating to the set of users currently
stored in the system (I.e. a set of user names). Implement this using a method with
the following header:
def return_users(self):

An example of calling this method is:
library_object.return_users()

The information returned by this method should have the property that it can be
easily interpreted when displayed using the Python print function. That is, the output
from the following print function should be easily interpreted:
print(library_object.return_users())

Task 3
Add an author to the system. Implement this using a method with the following
header:
def add_author(self, author_name, author_genre):

An example of calling this method is:
library_object.add_author(“James Joyce”, “fiction”)

Task 4
Return all associated pieces of information relating to the set of authors currently
stored in the system (I.e. a set of author names plus genres). Implement this using a
method with the following header:
def return_authors(self):

An example of calling this method is:
library_object.return_authors()

The information returned by this method should have the property that it can be
easily interpreted when displayed using the Python print function.

Task 5
Add a copy of a book to the system. Implement this using a method with the
following header:
def add_book_copy(self, author_name, book_title)

An example of calling this method is:
library_object.add_book_copy(“James Joyce”, “Ulysses”)

When a book copy is first added to the system it is initially not loaned to any user.

Task 6
Return all associated pieces of information relating to the set of book copies
currently not on loan (I.e. a set of book authors plus titles). Implement this using a
method with the following header:
def return_books_not_loan(self)

An example of calling this method is:
library_object.return_books_not_loan()

Note, multiple copies of a single book can exist in the system.

The information returned by this method should have the property that it can be
easily interpreted when displayed using the Python print function.