Assignment title: Information


Assessment Details You are required to document, test and refactor an existing application. You will be given a copy of an existing C# application which is responsible for taking bookings for a cruise ship, this application is badly in need of refactoring and even a casual viewing of the source code reveals many examples of the "code smells" discussed by Fowler. CRICOS Provider No. 00103D ITECH3201 Assignment 1 - 2016-17.docx Page 1 of 5 1 Your report should be written in the same manner as Fowler has done in the prescribed text - small refactorings with code comparisons and UML diagrams (refer Fowler 2 pp.1-65). Ask your tutor if you have any doubts. Notes about the assignment • Theatres have three sections: stalls, dress circle and balcony • Each theatre section has a number of rows and each section row has the same number of seats. • Each section has a different price per seat o Stalls $38.50 o Dress circle $49.50 o Balcony $91.50 • Customers must register with the system prior to placing a booking o Customers must present credit card information when registering • Customers may be members or nonmembers of the "Theatre Club" o Non-members pay full price per seat o Members fall into three categories: bronze, silver and gold ▪ Bronze members are entitled to a discount of 10% off the total price of their booking ▪ Silver members are entitled to a discount of 20% off their booking ▪ Gold members are entitled to a discount of 30% off their booking • The system will automatically reserve a given number of seats in a requested section o The seats are booked in the first row of a section which is found to have the number of requested seats free adjacent to each other. o The application searches a section from the first row working backwards towards the last row until it finds the requested number of seats. o There is no facility to book a particular seat. • The system can potentially manage many theatres, each theatre has a number of theatre bookings (events) and each theatre booking has a number of customer bookings. • Customers can currently only make a single booking for each event. 1 Your report should adhere to the guidelines described in the General Guide for the Presentation of Academic Work: http://federation.edu.au/current-students/learning-and-study/online-help-with/guides-to-your-assessments 2 Fowler, M., & Beck, K. (2000). Refactoring : improving the design of existing code. Reading, MA: Addison-Wesley. CRICOS Provider No. 00103D ITECH3201 Software Engineering: Analysis & Design ITECH3201 Assignment 1 - 2016-17.docx Page 2 of 5 Requirements • Report detailing any "code smells" present in the code and how you intend to refactor them out of the code • A refactored version of the system eliminating all identified code smells • A class diagram illustrating the initial code and another class diagram illustrating the final refactored code (including all relevant dependencies) • Sequence Diagram: Calculation of Charges (represent the calls made by the refactored system when calculating the charges for a booking) • Sequence Diagram: Booking Seats (represent the calls made by the refactored system when booking seats in response to a reservation) • A sequence diagram illustrating how the final refactored system processes a new booking • Extensive NUnit tests for the methods Calculation of Charges and Booking of Seats • Add a loyalty rewards system. People who are bronze members of the loyalty rewards program receive a 5% discount on all bookings, people who are silver members receive 7.5% discount, while gold members receive 10% off the cost of their bookings. Your report should identify any of Fowler's "Bad Smells" in the code, and which refactorings you performed to improve the application's design. Refactor the code using the textbook and the refactoring example from the lectures as a guide. The resultant code should be generally free from Fowler's "code smells", this will become obvious when you start writing your NUnit tests and documenting the refactored system in UML.