In this assignment you are required to document, test and refactor an existing C# application. You will be given a copy of an existing C# application which is responsible for setting up fully automated fuel delivery 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.

Your report should be written in the same manner as Fowler has done in the prescribed text - small refactorings with code comparisons and UML diagrams (refer Fowler pp.1-65). Ask your tutor if you have any doubts.

A petrol station is set up for fully automated operation. Drivers swipe their credit card through a reader connected to the pump; the card is verified by communication with a credit company computer; and a fuel limit is established. The driver may then take the fuel required. When fuel delivery is complete and the pump hose is returned to the holster, the driver’s credit card account is debited with the cost of the fuel taken. The credit card is returned after debiting. If the card is invalid, the pump returns it before fuel is dispensed.

Requirements for a fuel delivery system

The system should provide an unattended fuel delivery service where a specified amount of fuel is delivered to customers. The cost is deducted from the customer’s credit card account.

The sequence of actions to dispense fuel should be:

  • The customer selects the type of fuel to be delivered. There are four types of fuel available as following: See image.
  • The customer inputs either a cash limit or a maximum amount of fuel to be delivered
  • The customer validates the transaction by providing credit card account details.
    • The amount of fuel allowed depends on the credit limit but customers may wish to fill up rather than have a specified amount of fuel. By specifying a maximum, the system can check if credit is available.
  • The pump is activated and fuel is delivered, under customer control.
  • The transaction is terminated either when the pump nozzle is returned to its holster or the tank is full.
  • A receipt is printed for the customer.
  • The fuel stock is updated.
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.