The base application consists of three classes - doctor


Disclaimer

You must use the code supplied by your tutor. Do not use code given to you by another student (or past student) as the codebase 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 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

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, now spend some time getting to know the code before you do anything else. 

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).


Attachment:- ASSIGNMENT.rar

Solution Preview :

Prepared by a verified Expert
Database Management System: The base application consists of three classes - doctor
Reference No:- TGS0655361

Now Priced at $70 (50% Discount)

Recommended (99%)

Rated (4.3/5)