LO1 Understand basic features of programming and scripting languages for data science and web development
2024-11-30 13:39:14
MOD008904 (010-2) Programming Project (70% Weighting) 2024-25
Development of an Efficient Forecourt Fuelling System
Introduction
Pitstop Fuelling Ltd have forecourts situated in prime routes for daily commuters and holiday destinations.In peak times (e.g. Holidays) queues for fuel can be very long resulting in blocked access roads and customers going elsewhere. Therefore, an efficient fuelling system is required to maximise capacity, throughput and profits. Pitstop Fuelling Ltd (the client) has 9 fuel pumps (over 3 lanes) and a centralised fuel attendant that controls the pumps (Fig-1).
Proposed Solution (Overview)
The client wants vehicles to be added to queues.Fuelling is to start when vehicles are assigned to pumps.Vehicles are given a finite time to fuel before it needs to leave the forecourt, therefore sometimes not all vehicles will get fully fuelled.Vehicles that are filled up before the elapsed time also need to leave the forecourt.Each pump dispenses 1.5 litres / second.
The fuel attendant is critical to control this operation; therefore, they are paid a commission of 1% (0.01) of the total sales to their hourly rate of £12.49.Attendants work an 8-hour shift.
The Client wants a user interface to control the pumps as well as displaying and recording the following data.A proposed example is shown in Figure 2.
- Running Total of number of litres dispensed.
- Total fuel cost.
- 1% commission for attendant.
- The number of vehicles fuelled.
- The number of vehicles that left before being fuelled.
Figure 1: Forecourt Configuration
Figure 2: Proposed User Interface
The Client has provided a set of following requirements.
REQUIREMENTS
General
- The application MUST be written using C#.
- The IDE toolset MUST be Microsoft Visual Studio
- The application MUST be Console based.
Basic Functionality
- A new vehicle MUST be created every 1.5 seconds.
- Each fuelling process MUST take a fixed time of 8 seconds.
- Each pump MUST fuel only one vehicle at any time.
- After elapsed fuelling time the number of litres dispensed MUST be recorded.
- When pumps are not in use they MUST be displayed as available.
- Newly created vehicles waiting for a pump MUST NOT have a limited waiting time.
- The attendant MUST be able to press the number of any available pumps (1 to 9) to assign a vehicle to it.
- Fuel type MUST be Petrol only
- Vehicle type MUST be Cars only
Satisfactory Functionality
- A new vehicle SHOULD be created every 1500 to 2200 milliseconds.
- Only one vehicle SHOULD be waiting to be fuelled.
- Each fuelling time SHOULD be randomised between 3000 and 5000 milliseconds.
- Newly created vehicles SHOULD start fuelling within 1500 milliseconds of their creation.
- Newly created vehicles SHOULD NOT be permitted to fuel after 1500 milliseconds of their creation.
- Newly created vehicles that have failed to start fuelling within 1500 milliseconds of their creation SHOULD be removed from the forecourt.
- There SHOULD be 3 types of fuel (Petrol, Diesel and LPG).
- There SHOULD be 3 types of vehicles (Car, Van and HGV).
- Both type of vehicle and type of fuel used SHOULD be selected at random.
- Both HGV and Vans SHOULD use any fuel type.
- All pumps (1 to 9) SHOULD dispense all fuel types.
- The user interface SHOULD display the number of litres of diesel dispensed.
- The user interface SHOULD display the number of litres of LPG dispensed.
- When launched, the user interface SHOULD require a username and password security login.
- The user interface SHOULD display the username of the attendant currently logged in.
- The user interface SHOULD display a log out facility for the user.
Good Functionality
- The queue of vehicles waiting to be fuelled MAY be limited to 5 vehicles.
- When the queue limit reaches 5 vehicles, the fuelling time MAY be randomised between 1000 and 2000 milliseconds.
- Each newly created Car MAY have a maximum fuel tank size of 50 litres.
- Each newly created Van MAY have a maximum fuel tank size of 80 litres.
- Each newly created HGV MAY have a maximum fuel tank size of 150 litres.
- HGV MAY use diesel only.
- Vans MAY use diesel or LPG only
- Cars MAY use all fuel types.
- Newly created vehicles MAY be created with random values of fuel already in their tank.
- Newly created vehicles fuel levels MAY be limited to less than or equal to 50% of their tank capacity.
- Fuelling time MAY be determined on newly created vehicles current fuel levels.
- For each lane, vehicles that are fuelling MAY be restricted from blocking access to waiting vehicles that have been assigned a pump.
- At the end of the attendant’s shift, the wage MAY be calculated and displayed once the user has logged out.
- All recorded data for the shift MAY be logged to a file.
Excellent + Functionality
- The complete system MAY run in a fully automated process i.e. without the need for an attendant.
- Vehicles MAY be automatically assigned pumps.
- The user interface MAY show which vehicles have been assigned to each pump.
Student Guidance
The Submission Deadline for this assessment is: Friday 13th December 2024 at 2pm
- You are encouraged to research and utilise built in C# functionality. You must acknowledge and reference all sources of information and code examples used.
- You may discuss your ideas with your colleagues, however, any code or material you submit should be your own work, produced individually and not in collaboration with others!
- The proposed user interface (Fig 2) can be used as guidance. The idea is to make the screen simple, clear, and easy for the user to use (using simple characters).
- You will be assessed on the level of code elegance, functionality and standards including maintainability and portability.
- You are required to submit a word-processed report that includes design methodology, user guide and test plan.
- Evidence will be in the form of student demonstration, a project report (submitted to CANVAS) and program code.
Module Learning Outcomes