Part A of this assignment is based around the following description of a system needed for a registered charity. You are required to analyse this description and to produce an object oriented model for this (documented as a UML diagram).
List all the nouns and verbs (and noun and verb phrases where appropriate) in the description of the system described below.
Having analysed the noun and verb lists as candidate classes and methods (as in Unit 4 of the course material):
Propose an object oriented model to solve the specified problem and document this as a UML class diagram. You should include
A registered charity has its main office in London and aims to help people who have become unemployed. The charity requires a system to keep track of goods donated (TV's, toys, computers, books, CDs etc) i.e. items that have been donated by members of the public. Additionally the charity needs to know where these items are stored so that it can distribute them to unemployed people who live locally. The charity does not want to transport goods unnecessarily over long distances. All donated items are classed as one of two types:-New Items and Used items.
For each item donated the following information is stored:-the type at the Item (TV, DVD player, book etc -stored as a string), its financial value in pounds (an integer), its storage location (string) which is usually the nearest large city to where it was donated e.g. Manchester, Birmingham or London. The value of an item is initially set to zero for all items. This value can be checked by a user at the system. Each item is described by its type and location.
New Items have their value assessed by a human assessor employed by the charity based on the amount that the charity could reasonably expect to sell this item for. The value of the item will be set to the value provided by the assessor (an integer). New items also have a guarantee (boolean value) which is true or false depending upon whether it comes with a guarantee. This value is set as true or false when an item is donated and can be checked by a user of the system.
Used items do not have their financial value checked. The initial value set to zero remains unchanged. However they do have a 'Safe' status (boolean) which is assumed to be false when the item is donated. Each item is tested (visually inspected). If the test is passed the value Safe will be set to true and a message is displayed to say 'Item passes visual inspection'. Used items are described by their type, location and 'Safe' status.
Some used items belong to a subcategory of Used Electrical Goods. In addition to the visual inspection when used electrical items are checked they must pass an electrical test and an additional message 'Item passes electrical safety test' must be displayed to confirm this.
Finally the charity keeps a Catalogue of donated items. It must be possible to add donated items to this catalogue, delete donated items (once they have been given away), list items in the catalogue that are at a specified location and print a stock report (this simply calculates and displays the total number of items in the catalogue and their total value in pounds).
Part B of this assignment is based around a very brief description of a system needed for a university library. A model of a proposed system is included as a UML diagram as is a detailed description of each class and operation. You are required write a Java program, using the BlueJ IDE, to implement a solution as specified by this documentation. Create additional accessor methods if these are required.
Implement and test the model in Java using BlueJ. You should apply ALL the coding conventions exemplified in the code presented in Units 1-4 including naming, layout and commenting: 10% of the marks will be explicitly awarded on this and poor presentation may adversely affect marks for other aspects if it obscures the correctness of otherwise satisfactory code.
Task 4 should be submitted as a working BlueJ project. A printout of the code must also be submitted.
The University Library requires a system to keep track of the material registered users borrow and to record fines for late returns. Registered users, students at the University, will gain entrance to the university library outside of normal opening hours using a university swipe card. This card will also be used when borrowing or returning material. A model is required which represents the key characteristics of the users of the library.
Each user has a name, library number (stored as text), the number of books currently on loan and the number of items returned late. A user can borrow a book or return a book. When a book is returned its status is noted (true if late). Ii a book is returned late then the number of items returned late is incremented (this value is never decremented). A user is described by their name and library number e.g. "Simon Kendal 01234".
All usersstudents fall into one of the following two categories :-undergraduate students or research staff.
If undergraduate students return a book late £1 is added to their outstanding fine (in addition to the normal action of incrementing the number of items returned late). Students can payoff all of their fine in one lump sum (but they cannot payoff part of their fine). Additionally each undergraduate student has a list of reserved books.
A list of reserved books is maintained (one list for each undergraduate student). A book title can be added to the list and the list can be printed in alphabetical order. Using this, students can reserve a book and display the list of reserved books.
Full time undergraduate students are allowed to borrow up to 6 books. Part time undergraduate students are allowed to borrow 3 books.
Researchers are allowed to borrow and return research papers as long as the number of research papers on loan does not exceed 10. Research staff are not fined for late books (as undergraduate students are) though, as for all library users, the number of items (books or research papers) returned late is recorded.