Reference no: EM133713981
Programming Fundamentals
1. Overview
The main objective of this final project is to assess your capability of program design and implementation for solving a non-trivial problem. You are to solve the problem by designing a number of classes, methods, code snippets and associating them towards a common goal. If you have questions, please ask via the relevant Canvas discussion forums in a general manner; for example, you should replicate your problem in a different context in isolation before posting, and you must not post your code on the Canvas discussion forum.
2. Assessment Criteria
This assignment will determine your ability to:
Follow coding, convention, and behavioural requirements provided in this document and in the course lessons;
Independently solve a problem by using programming concepts taught in this course;
Design an OO solution independently and write/debug in Python code;
Document code;
Provide references where due;
Meet deadlines;
Seek clarification from your "supervisor" (instructor) when needed via the Canvas discussion forums; and
Create a program by recalling concepts taught in class, understand and apply concepts relevant to solution, analyse components of the problem, evaluate different approaches.
Learning Outcomes
Analyse simple computing problems.
Devise suitable algorithmic solutions and code these algorithmic solutions in a computer programming language (i.e., Python).
Develop maintainable and reusable solutions using object-oriented paradigm.
Assessment Details
Requirements: Your code must meet the following functionalities, code, and documentation requirements. Your submission will be graded based on the rubric published on Canvas. Please ensure you read all the requirements and the rubric carefully before working on your assignment.
A - Functionalities Requirements:
There are 4 levels, please ensure you only attempt one level after completing the previous level.
Your project is to implement the required functionalities in the Object-Oriented (OO) style with at least three classes: Records, Book, and Member. You need to design appropriate static/instance variables, constructors, and static/instance methods in these classes. The class related info should be encapsulated inside the corresponding class.
At this level, your program can read data from the record file specified in the command line, which stores the number of days various books have been borrowed by some members of a library (record file). Your program should create a list of Book objects, a list of Member objects, and a variable (you can think carefully about which data type to use) to store these number of borrowed days. You should design the classes properly so that these actions can be encapsulated within the appropriate classes. Note that, at this level, we only know the IDs of the books and members. These IDs are all unique.
In the main class, your program should create a Records object, call its method read_records(record_file_name) to load all the data from the record file, and then call the display_records() method to display the number of days all the books have been borrowed in the required format (as specified in the following).
Below is an example of the file that stores the number of days all the books have been borrowed by all the members of the library - see the next page. The data fields in this record file are separated by commas, colons, and new lines. Each row contains the book IDs, and the number of days the books have been borrowed by the members of the library. The format of each row is always book_ID, member_1: num_days_1, member_2: num_days_2, ... When the member only reserves the book but hasn't taken it yet, the data field after the colon corresponding to the member will be R. For example,
Your program should print a message indicating how to run the program if no record file is passed in as a command line argument. Otherwise, it can display a table showing the number of days the books have been borrowed by the members of the library, and two sentences showing the total number of books and members, and the average number of days the books have been borrowed. In the table, if a book is not borrowed or reserved by a member, then the data field at that location has an ‘xx' symbol. On the other hand, if the book has been reserved by a member, the data field at that location is shown as a double dash (--). Also, the data in the columns in the table are aligned, in particular, the member IDs are aligned to the left whilst the records (the number of borrowing days) are aligned to the right.
The printed messages corresponding to two scenarios need to be exactly as below:
This is when no record file is passed in as a command line argument.
This is when a record file is passed in as command line arguments. Note that users can specify a different file name, not necessarily the name records.txt.