How you intend to refactor them out of the code

Assignment Help Programming Languages
Reference no: EM131950531

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 theater, 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 (small refactorings with code comparisons and UML diagrams)

Notes about the existing application:

- 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, Stalls $30.00, Dress circle $50.00, Balcony $90.00
- Customers must register with the system prior to placing a booking (Customers must present credit card information when registering)
- Customers may be members or nonmembers of the "Theatre Club"
- Non-members pay full price per seat
- Members fall into three categories: bronze, silver and gold. Bronze, Silver and Gold members are entitled to a discount of 10%, 20% and 30%, respectively off their booking.
- The system will automatically reserve a given number of seats in a requested section
- 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.
- The application searches a section from the first row working backwards towards the last row until it finds the requested number of seats.
- 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.

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. That theater is running a new promotion to include more members. If a Gold member includes his/her friend as the new member of the Theater, s/he (Gold member) will receive a further 15% in next booking. This numbers are 10% and 5% for silver and bronze members, respectively.
- The existing application doesn't allow to book any particular seat. Include an appropriate method in your code base so that only the Gold members can book a particular seat. If that particular seats is not available, the user may try for more 2 time to select another seat. However, when all the chances are gone, that booking will be performed in usual system.
- 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.

Submissions
- A solution called final which has all of the final refactored code and the project for the unit tests
- The accompanying Enterprise Architect file with model versions of the original (that you started with) and final code projects.
- A word document containing your UML models and a justification of your refactorings.

Reference no: EM131950531

Questions Cloud

Standard deviation of the sampling distribution : On a specific day, a store in the mall took a random sample of 112 shoppers and recorded the proportion of females in the samples.
Explain the significance of weber work of psychology : Explain the significance of Weber's work on sense of touch in the history of psychology. Questions about perceptual processes and the contents of consciousness.
What does the irs say is the purpose of this change : If an employee earns $50,000, how are employer paid medical premiums treated with regards to the employee's federal income taxes?
Identify the first principles of security as defined by nist : Identify the first principles of security as defined by NIST. Define the objectives and challenges of applying the first principles of security.
How you intend to refactor them out of the code : Report detailing any "code smells" present in the code and how you intend to refactor them out of the code
Find the probability that fewer than three of the selected : Find the probability that fewer than three of the selected adults watch? prime-time live.
Describe how the healthcare administrator uses : Define each of the following terms and describe how the healthcare administrator uses each of them in quantitative analysis:
Identify themes in the works of carl jung : Identify themes in the works of Carl Jung that seem consistent with contemporary cross-cultural approaches to psychology.
Discuss expert power exertion of one of the sources of power : Select four people currently in the media and discuss Expert Powers exertion of one of the sources of power.

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a function that takes a one dimentional array

Create a function that takes a one dimentional array us a argument the function should return only these members from the array which are divisible by 4.

  The ideal hpc programming language

Read the article titled, "The Ideal HPC Programming Language" dated 2010. Describe one (1) way in which arrays are used in high-performance computing

  Write and implement generic set class with attributes

Write and implement the generic Set class with attributes you find essential and with the following methods. Set class has nonduplicate elements.

  State space search using prolog and lisp

State Space Search using Prolog and LISP - solve problem using the Prolog computer programming language

  Test a program for calculate interest

Test the program for a mortgage of $240,000 at 6% annual rate of interest, and duration 360 months. Such a mortgage will have a monthly payment of $1,438.92 and total interest of $278,011.65.

  Write a program to calculate the body fat of a person

One way to determine how healthy a person is by measuring the body fat of the person. Write a program to calculate the body fat of a person.

  What possible values can a boolean variable hold

What possible values can a Boolean variable hold? Examine the following code and explain what is wrong with it .If 59 then output" The value is outside the valid range" end if.

  Compute average of values contained in integer

Compute the average (as a double) of values contained in integer variables num1, num2, num3 and allot that average to double variable avg.

  Write program using array of seven long integers

Write down the program which uses the following arrays: empId: array of seven long integers to hold employee identification numbers. Array must be initialized with following numbers.

  Write shell script to read from keyboard-display on monitor

Write shell script called poject.21 to read from keyboard and display on monitor first name, last name and age if the age is less than 50.

  What is a recursive function

I have a question related to a recursive function. I have ran it and got it to do what it is supposed to. However, I don't fully understand how it is actually working and how it gets the answer

  Write program for bucket sort containing method called sort

Columns indexed from 0 to n - 1, where n is the number of values to be sorted. Each row of the two-dimensional array is referred to as a bucket. Write a class named BucketSort containing a method called sort.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd