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 hospital system, 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 three classes – Doctor, Patient and Hospital.
A patient can be a private or public patient and is handled differently in either case. Patients are assigned to Doctors according to availability and preference.
Step 1 – Rename the base code
Step 2 – Identify “code smells”
Open up a new document in Word (or equivalent), start jotting down 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 intial 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 – Start refactoring and developing your unit tests
Ensure that your starting code and EA file is backed up, and once this is done jump back into Visual Studio and get to work refactoring.
Your final code should be fully refactored and have unit tests developed for every method (other than ToString and Get and Set methods
This assignment consists of a number of tasks for you to perform as detailed in the following:
o (2 marks) A sequence diagram illustrating how the final refactored system processes a new patient.
Implement functionality that enables the Doctor’s fee to be calculated according to the above requirements. Note a public patient gets no discount.
Assignment Writing Help
Engineering Assignment Services
Do My Assignment Help
Write My Essay Services