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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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