EN3085 Assessed Coursework 2

EN3085 Assessed Coursework 2

You should solve the problems independently from other students and submit only your own work. Submit the programs and a short report explaining your solutions and demonstrating their correctness by 6pm, 13/05/22 through Learning Central.

1.   Your company has won a contract to create a software system for a local library. You are given a task of documenting functional requirements for the system in the form of UML diagrams. The new system will have the same functionality as the old system, which is being replaced as it is no longer supported. After conducting an interview with a library employee, you found the following information. A librarian can use the current system to add a new item to the system, to delete an item from the system, to issue an item to a library member, to update an item as returned and to search for an item in the catalogue. To add a new item to the system, the librarian needs to specify if the item is a book, a film or a music album and enter the appropriate details into the system. To issue an item to a library member, the librarian needs to obtain the library member number and add it to the record of the borrowed item. If the item happens to be a film, the librarian needs to charge an appropriate fee. Assume that all actions involve the software system.

i.       Draw a top-level UML use case diagram for the above system.               

ii.       Apply use case <<include>> relationship to describe in detail how a librarian would issue an item.                                                           

iii.       Apply use case <<extends>> relationship to specify what happens when the item being issued happens to be a film.                                       

2.        Next, your colleagues have provided you with the following class hierarchy diagram for library items:

Write a C++ class Entry according to the given diagram. Derive from it three subclasses: MusicAlbum, Book and Film. The class Entry should have member variables to store the name of the item and if it is borrowed and by who. The subclasses should have additional data members as specified in the diagram. Include member function declarations into your four class definitions according to the diagram. In addition, include two constructor declarations for each of the subclasses: one constructor with parameters for passing the values of all data members and another constructor with no parameters, but which allows the user to enter the values for all data members interactively. Use virtual functions appropriately. Write definitions of all member functions for all classes. The functions printDetails() should display the values of their class data members.    

3.    Draw a class diagram for a class Catalogue for the above system. An object of class Catalogue will store information about how many different library items there are currently in the library system and store an entry for each item using the classes you implemented for question 2 and a suitable template from the Standard Template Library. The class Catalogue should have a member function for each use case of the top-level UML diagram you developed for question 1. Write C++ code for the class Catalogue according to your class diagram, including member function definitions. Use Standard C++ Library algorithms where appropriate. 

4.        Write a C++ program implementing the library software system. The program should allow the user to invoke all functionality of the class Catalogue you developed for question 3 through a user-friendly interface. Develop additional useful functionality, for example, saving the data stored in a catalogue object to a file and reading the data from the file into a catalogue object.   

5.      Provide documentation for your program. Include a short description of the problem-solving phase and the implementation of your program, as well as an account of its limitations and possible improvements. Reflect on the software process model you used. In addition, as part of the documentation, provide evidence of testing. You must supply and explain the choice of values, which you used to test your program and the answers, which the program gave. You should also document any particular cases for which your program fails, or better add code to your program to make sure that they do not occur.

Submission Procedure

You should solve the problems independently from other students and submit only your own work. Submit the programs and a short report explaining your solutions and demonstrating their correctness by 6pm, 13/05/22 through Learning Central.

You should submit exactly 4 files in total:

1.       One report as a pdf or a MS word file.

2.       One header file with extension .h or .hpp, where all your class definitions should be included.

3.       One implementation file with extension .cpp, where all your class implementations should be included.

4.       One .cpp file containing the main() function and possibly some global functions.

Do not copy your program code into a report or a MS file, only attach the original .h and .cpp files as described above. Any incomplete submission will be considered late.

 

Marking criteria:

(1) Source code. Marks will be awarded for:

• A correctly functioning program. The program should operate according to the specification.

• An efficient program and elegant algorithms. Try to develop algorithms, which are efficient in terms of the amount of data, which needs to be stored (e.g. minimum number of variables used), and the speed in which they operate.

• A user-friendly program. When your program runs, the messages on the screen should be easy to understand and succinct.

• A well commented program. The judicious use of commenting is essential if somebody else is to easily understand your program.

With that in mind, each coding question will be marked using the following scheme:

 

 

Programming techniques usage & understanding (70%)

Programming Style/presentation (30%)

Outstanding

(90-100%)

Exceptionally comprehensive and detailed knowledge of programming concepts that goes beyond what was taught, achieving an exceptional understanding level.

An exceptional effort was achieved through an unusually ingenious manner to organise and comment the code.

Excellent

(80-89%)

Demonstrated a thorough and detailed knowledge, that goes beyond the taught programming concepts required to solve the problem; significant new insights.

Extremely clear & well-structured program, with excellent & efficient use of comments

Comprehensive

(70-79%)

A thorough usage and understanding of the taught programming concepts.

A very clear and well-structured program; with a good usage of comments

Good

(60-69%)

Good usage and understanding of taught programming concepts but with some minor omissions or errors.

A fairly clear and well-structured program but could be structured or annotated better.

Fair

(50-59%)

Adequate usage and knowledge of taught programming concepts but with some errors and omissions.

Reasonably organised code but with limited effort in the presentation.

Bare pass

(40-49%)

Some usage of taught programming concepts but with frequent errors and omissions.

Poorly organised code, resulting in lack of clarity about its structure.

Fail

(30-39%)

Limited usage of taught programming concepts with frequent major errors and omissions.

Poor code structure suggesting a lack of understanding on how a program is organised.

Insufficient

(20-29%)

Very limited usage of taught programming concepts with frequent major errors and omissions.

Poor code structure demonstrating a lack of understanding on how a program is organised

Unsatisfactory

(10-19%)

Minimal programming knowledge demonstrate, numerous major errors.

Almost no effort was done in trying to present the code properly.

Poor

(<10%)

Almost no programming work completed

No effort was done in trying to present the code properly.

(2) Documentation. Marks will be awarded for:

·       A well documented program. Include a short description of the problem-solving phase and the implementation of your program, as well as an account of its limitations and possible improvements.

·       A well tested program. You must supply and explain the choice of values, which you used to test your program and the answers, which the program gave. You should also document any particular cases for which your program fails, or better add code to your program to make sure that they do not occur.

 

文章详情

其他资讯

创建时间:2022-04-15 13:57