COMP2045 Coursework – Book borrowing management


Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due


COMP2045 Coursework – Book borrowing management

Introduction

This coursework is worth 35% of the total module mark. It requires you to write an interactive, menu-driven program that acts as a book borrowing management program. The deadline for this exercise is 18:00 on Monday 28th of April 2025.

Read the entire document before beginning the exercise.

If you have any questions about this exercise, please ask in the Q&A forum on Moodle, after a tutorial session, or during the advertised office hours. Do not post your program or parts of your program to Moodle as you are not allowed to share your coursework programs with other students. If any questions require this exercise to be clarified, then this document will be updated, and everyone will be notified via Moodle.

Submission

You must submit a single C++ source code file containing all your code for this exercise. This file must be called books.cpp and must not require any other files outside of the standard C++ headers which are always available. The first line of the file should be a comment which contains your student ID number, username, and full name, of the form:
// 6512345 zy12345 Joe Blogs

The file must compile without warnings or errors when I use the command

g++ books.cpp -o books

This command will be run on our Linux server cs-linux. If it does not compile, for any reason, then you will lose all the marks for testing (common reasons in the past have been submitting a file with the wrong filename or developing your solution on your personal computer without having tested it on our Linux server). If the file compiles but has warnings, then you will lose some marks for not correcting the warnings.

Before you submit your source code file, you must complete the Coursework submission coversheet on Moodle.

The completed source code file should be uploaded to the Coursework Submission link on the COMP2045 Moodle page. You may submit as many times as you wish before the deadline (the last submission before the deadline will be used). After the deadline has passed, if you have already submitted your exercise then you will not be able to submit again. If you have not already submitted, then you will be allowed to submit once.

Late submissions: Late submissions will lose 5 percentage points per hour, rounded up to the next whole hour. This is to better represent the large benefit a small amount of extra time can give at the end of a programming exercise. No late submissions will be accepted more than 24 hours after the exercise deadline. If you have extenuating circumstances, you should file them before the deadline.

Plagiarism

You should complete this coursework on your own. Anyone suspected of plagiarism will be investigated and punished in accordance with the university policy on plagiarism (see your student handbook and the University Quality Manual). This may include a mark of zero for this coursework.

You should write the source code required for this assignment yourself. If you use code from other sources (books, web pages, etc), you should use comments to acknowledge this (and marks will be heavily adjusted down accordingly). The only exception to this is the example programs given in lectures and tutorials; you may use them, with or without modification, without penalty.

You must not copy or share source code with other students. You must not work together on your solution. You can informally talk about higher-level ideas but not to a level of detail that would allow you all to create the same source code.

Remember, it is quite easy for experienced lecturers to spot plagiarism in source code. If you are having problems, you should ask questions rather than plagiarize. If you are not able to complete the exercise, then you should still submit your incomplete program as that will still get you some of the marks for the parts you have done (but make sure your incomplete solution compiles and partially runs!).

Task

A simple book borrowing management software was developed by a computer science student, and the executable file is available on Moodle. While the software functions correctly with valid user input, it is not fully satisfactory as it does not handle incorrect input effectively. Here are a few examples: 1) When the program prompts the user to choose an option, it may crash if non-digit characters are entered. 2) The program does not check the validity of the ISBN of books and members.

Your task is to develop a C++ program that replicates the functionality of the provided book borrowing management program (the executable file on Moodle), with the added ability to handle invalid user input gracefully. The requirements for handling invalid input are as follows:

1) The program must handle and ignore any invalid user input without terminating or displaying runtime errors.
2) The ISBN must be a 13-digit numeric code that uniquely identifies a book. If the entered ISBN already exists in the system, it should be considered invalid.
3) The member ID must be a 10-character string that contains English alphabets and numbers only. It must start and end with an English alphabetic character. If the entered member ID already exists in the system, it should be considered invalid.
4) If the user selects the "Issue Book" or "Return Book" option and enters a member ID that does not exist in the system, it should be treated as invalid input. The program should print “Invalid input. Try again.\n” and return to the main menu.
5) In the event of invalid input, the program should print “Invalid input. Try again.\n” and wait for user input again.

Marking

The marking scheme will be as follows:


  • Fundamental structure (10 marks): Your program should be written using objected-oriented principles in the C++ programming language. It must compile without any errors and warning messages.
  • Tests (25 marks): Your program should correctly implement the task requirements. A number of tests will be run against your program with different input data designed to test if this is the case for each individual requirement. The tests themselves are secret but general examples of the tests might be:
    • Does the program work with typical valid input?
    • Does the program correctly deal with input around boundary values?
    • Does the program correctly deal with invalid input?
    • Does the program produce the correct output as specified in the requirements?
    • Does the program work with a proper user interface, i.e. exactly same as the given executable file?


If the output format (user interface) differs from that of the provided executable file, 30% of the testing marks will be deducted.

Example I/O:


END

发表评论

电子邮件地址不会被公开。 必填项已用*标注