Library Management Software in C++
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMP26020 Assignment
Library Management Software in C++
The goal of this assignment is to implement a set of C++ classes that aim to be used in a library management
software. The library holds documents of different types (novels, comics and magazines) with various attributes
(title, author, etc.) and users can borrow and return documents.
• library.h has the different classes definitions including inheritance relationships as well as the
prototypes for all classes’ methods.
• library.cpp contains the implementations of the classes.
• test-suite.cpp, catch.h, and catch.cpp implement a test suite that checks the correctness of the
library code.
We have already implemented everything! The code is 100% functional. Check your gitlab repo or the
Blackboard entry for this assignment.
Wait. What’s the point of this assignment then?
Well, the code was written by someone who only watched some of videos for the first week of C++ and then gave
up. The code is more C than C++, it does not use the standard library, and it does not follow any of the C++ design
approaches. This is not good C++ code.
Your actual goal is to rewrite library.h and library.cpp applying the lessons learnt in the lectures, including:
• RAII
• new/delete considered harmful
• C-arrays, C-strings considered redundant
• C++ standard library containers, utilities, and algorithms
• Improved type safety
• Using linters, static analyzers, and the C++ Core Guidelines to uncover errors and bad coding patterns
You are free to a) add member functions, b) change the implementation of existing member functions, or c)
change private declarations for variables or functions in library.cpp and library.h.
You should not change any other file. Also, you should not change the interface of any public member functions
of any of the classes. The only allowed interface change is changing the type of a function argument or the return
value to an equivalent one. E.g., an int return value that is meant to be used as a true/false value can be replaced
by a bool. A C-string (char *) argument or return value can almost always be changed into an std::string.
Test Suite