Recent Question/Assignment

ITECH3201-7201
Assignment 1 – Semester 2, 2015
Marks: ITECH3201: 20 ITECH7201: 24
Weighting: 20% of unit total
Due: As per unit description
Type: Individual Task
Important Note
This assignment requires the use of a provided code base. You must use the code supplied by your tutor. Do not use code given to you by another student (or past student) as the code base will be different and you will be awarded ZERO MARKS for the assignment task.
Description
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 managing vehicle rentals for a car hire company. This application is badly in need of refactoring and even a casual viewing of the source code reveals many examples of the “code smells” talked about in Fowler’s book.
The base application consists of five classes: FederationHire, HireLocation, Vehicle, Booking and Client.
Clients are able to hire vehicles according to availability and preference.
ITECH3201-7201 Assignment 1
Assignment Requirements
Step 1 – Rename the base code
1. Download the code from Moodle and unzip it in the filesystem
2. Rename the base folder to “Assignment 1 – yourid” (your id equals your student number)
3. Open the solution up in Visual Studio right click on the Solution and rename it as per (2)
4. Build the solution and inspect the output. Spend some time becoming familiar with the code before you do anything else.
Step 2 – Identify “code smells”
Open up a new document in Word (or equivalent), start documenting any code smells you identify in the code in point form. You might want to cut and paste the code into Word to illustrate the problems.
Step 3 – Create a class diagram of the initial code.
Do this in Enterprise Architect and copy the resultant diagram into your Word file. Ensure your EA file is saved and labelled as “starting code base”.
Step 4 – Refactor and unit test code
Ensure that your starting code and EA file is backed up. Once this is done, commence refactoring the code in Visual Studio. Document each change you make and provide an explanation of why you have done so.
Your final code should be fully refactored and have unit tests developed for every method (other than ToString and Get and Set methods). These unit tests should be documented to demonstrate the results before and after the changes to confirm that the functionality of the code has not changed.
Step 5 – Add additional functionality
Add and unit test new functionality to the application as per the description below.
1) The car hire chain offers loyalty discounts on the rental fee to members of its loyalty club. These discounts are:
• Blue: 10%
• Silver: 15%
• Gold: 20%
Update the code base to implement this functionality. No discount is offered to clients who are not members of the loyalty club.
2) ITECH7201 only: Update the code base to implement a further level of discount, of 50%, to be offered to clients who are also employees of the car rental company.
3) ITECH7201 only: Add an interactive menu to the application, allowing users to add clients, process car rental bookings and add new rental cars to the system.
Step 6 – Create diagrams of the final code.
Do this in Enterprise Architect and copy the resultant diagram into your Word file. Create a class diagram of the final code, and a sequence diagram showing how a new car rental booking is processed in the final code. Ensure your EA file is saved and labelled as “final code base”.
ITECH3201-7201 Assignment 1
Submit
You are required to submit the assignment before the due date consisting of:
• A Zip file containing the following (submitted via Moodle under the Assignment 1 link) o All code representing your refactored application and Unit tests
o The accompanying Enterprise Architect file with model versions that correspond to your final code submission.
o An electronic report, in Microsoft Word, containing your UML, identification of any problems with the initial code, and an explanation of your Refactorings.
Plagiarism
This is an individual assignment. You are not to attempt this assignment (or any part thereof) in conjunction with any other parties. All work handed in for marking should be your own and any help received should be explicitly acknowledged.
It is important to learn from the work of others and you are encouraged to explore the library, World Wide Web resources and have discussions with other students. However, work for assessment must be entirely the student's own work.
Plagiarism is the presentation of the expressed thought or work of another person as though it is one’s own without properly acknowledging that person.
You must not allow other students to copy your work and must take care to safeguard against this happening. In cases of copying, normally all students involved will be penalised equally; an exception will be if you can demonstrate the work is your own and you took reasonable care to safeguard against copying.
Plagiarism is a serious offence. As set out in the University Regulation 6.1.1. Students who are caught plagiarising will, for a first offence, be given a zero mark for that task. A second offence will result in a failing grade for the Unit(s) involved and any subsequent offence will be referred to the Student Discipline Committee.
Insert file name here
Marking Criteria: ITECH3201/7201 Assignment 1
Student ID
Student Name
Task Available Marks Student Mark
Documentation of Initial Code
• Report documenting “code smells” present in the initial code base 2
• Class diagram of the initial code in Enterprise Architect AND the report. 2
Refactoring
• Completed refactored code base, eliminating the bad smells present in the initial
code base 4
2
• Report documenting changes made to the code and justification of each change
• Report documenting unit tests demonstrating that the refactored code has
maintained previous functionality 2
Implementation of New Functionality
• Coding of new functionality to implement loyalty discounts for loyalty club
members (Blue = 10%; Silver = 15%; Gold = 20%) 2
• ITECH7201 only: Coding of new functionality to implement a discount of 50% for an “Employee” client-type. 2
• ITECH7201 only: Inclusion of an interactive menu allowing users to add clients,
process car rental bookings and add new rental cars to the system. 2
• Report documenting unit test results for new functionality 2
Documentation of Final Code
• Class Diagram of final code in Enterprise Architect AND the report 2
2
• Sequence Diagram in Enterprise Architect AND the report showing the processing a new car rental booking
Total 3201: 20
7201: 24
ITECH3201-7201 Assignment 1

Looking for answers ?


Recent Questions