COS700006: Object Oriented Programming Project 2 - 2017, Semester 1 10% of your final mark Project Description Resource Booking System (RBS) The maintenance manager of a well-known company is currently using a paper based (manual) system to manage reservations made by employees for various resources in the company such as meeting rooms, projectors etc. Due to the inefficiency of this system, often employees are faced with problems in reserving these resources and end up overbooking or using resources without booking at all. To overcome this issue, you are required to develop a console based application that will allow the maintenance manager to record and maintain bookings for company resources (currently there are only two types of resources, meeting rooms and projectors, later there can be more resource types). The maintenance manager has provided an employee list and resources list in text files. The system should have a simple menu as below. 1. Show available resources 2. Make a resource booking for an employee 3. Show bookings made by an employee 4. Show bookings for a resource 5. Delete booking 6. Exit The current manual system operates as follows. 1. Show available resources Depending on the employee’s request all available rooms or projectors are shown. (The shown resources should not be booked by another person and should be open to take bookings) 2. Make a resource booking for an employee The employee informs the maintenance manager the type of resource he/ she wish to book, the day and duration (number of hours). The manager looks at the available resources and if a resource is available during the required slot, a booking is made with the employee number. 3. Show bookings made by an employee The maintenance manager looks at the booking sheets for each room/ projector to check if a given employee number is present in those sheets. 4. Show bookings for a resource The maintenance manager looks at the booking sheets for a particular resource and informs the employee. 5. Delete booking When the employee number, date and time is given, the manager goes through all the bookings, finds the relevant booking and deletes it. You may start your design with the following recommendations. • You must include Company, Employee, Resource, Booking objects in your design • Currently there are two resource types, room and projector. You must have objects to represent them. • The company has a name, an employee list and resources list • An employee has a unique number, name and position level • Each resource has a name and a open for booking status (For example, when a projector is under maintenance the projector cannot be used, thus status false) • In addition to the common fields a resource has, a room has a maximum capacity, location • In addition to the common fields a resource has, a projector has a brand and model • A resource has zero or more bookings • An employee may place zero or more bookings • A booking is made for a resource and an employee • Each booking has a date, start time, end time and purpose • A booking can be made only up to seven days in advance • Rooms with a capacity of 20 or more can be booked only by executives and managers. • An employee may book a room for up to 8 hours per day • An employee may book a projector for up to 5 hours per day • Bookings can be made for all seven days a week from 8.00 am to 8.00pm. • Bookings should always display in sorted order Start with the above but revise and improve your design accordingly. Suggested steps Part A. 1. Do initial design on paper a. A class Diagram (without attributes and operations) b. A class Diagram (with attributes and operations) c. Rough sequence diagrams where it is not clear how a use case might be achieved (Note: You do not have to submit the sequence diagrams) 2. Discuss your design with your tutor and get feedback. 3. Make adjustments to your design as needed. Part B. 1. Write code for each class (not the console UI at this stage) a. Build upon the start-up code that is given. 2. Test and revise as necessary. Part C. 1. Build the User Interface. 2. Code each use case 3. Compile, test and debug in after every method you write. Part D. 1. Define where preconditions should be checked 2. Add precondition and any error handling/ validations after you have the basic system working. 3. Leave saving to a file until you have a basic system working 4. Once the basic system is working implement file reading/ writing functionalities (include error handling for file operations) Part E. 1. Review all requirements and make sure all work has been done. Part F. 1. Thoroughly test and fix as necessary. 2. Refactor in little increments, not in big blocks Deliverables All deliverables due by 5.00pm on April 28th, 2017. Design Documents: • Structure Chart for Console Interface (do in class with tutor) • Detailed Class Diagram (attributes, methods, relationships, multiplicities) Code: • The solution must be a Blue J Project. You need to hand in a hard copy and a soft copy. 0 marks will be awarded if the hard copy/ soft copy is not submitted. Hard copy: You need to hand in the printed report (hard copy) by the due date mentioned. The documentation has to be word processed and include a cover page, marking scheme, design documents and source code. (Note: Print the source code with font size 10pt. and do not print the Javadoc html files) Soft copy: The soft copy should include the source code (a BlueJ Project) and should be submitted to ESP by the due date. Expectations A. Your design must include and effectively demonstrate a good understanding of inheritance. This is to be done by • Including a Resource superclass • Including subtypes for Room and Projector B. You are required to save all object data between each execution to files. This is to be done by • Writing object data to a comma(“.”) delimited file before closing down the application • Reading object data from file and building all objects before the user interface is displayed. • Handle errors that can be caused by file handling C. Demonstrate how to implement an interface by making booking sortable. D. Produce a Quality Product • Methods should have precondition checking • The program must be of a professional standard. • It must be an OO design • All classes must follow the style guide in the text book • Javadoc is required • All instance variables must be private • The program must work reliably Plagiarism THIS IS AN INDIVDUAL PROJECT. • The submitted work must be your own work. • You may NOT view the code of other students. • You may discuss the work with teaching staff. • You may discuss the big design picture with peers but final design should be yours. • You must name and code attributes and operations on your own. • There will be absolutely no tolerance of plagiarism. • Any person that presents any work that is not their own or is not properly referenced will be awarded 0 marks for the project. Marking Scheme The below marking scheme will be used to mark the project deliverables. No Components Max Marks Marks Awarded Design 1 Structure chart for console interface 5 2 Detailed class diagram (all classes): • Identification of correct classes • Appropriate attributes and methods • Appropriate relationship between classes • Multiplicity used 20 Implementation 3 Appropriate implementation of functionality, including: • Implementing all the required OO classes/ methods appropriately to meet the functionality • Implementing console UI appropriately (UI class separated from business logic) • Implementing the utility classes appropriately 30 4 Implementing inheritance and polymorphism appropriately 10 5 Saving object data between executions including File reading, writing and managing any errors 10 6 Implementing an interface to sort 5 7 Overall working quality product in line with design • Pre-conditions are checked in methods • The overall product reflects OO design and works well • Input does not crash the program • Javadoc is included in all classes • Follows Java programming conventions 20 Total 100 Note: A penalty will be applied if no hard copy is submitted.