MOD003212 The Vehicle Applications
You will provide a User Guide for the program.
Your program will allow the user to
1. Check in a guest party
2. Check out a guest party
3. Display the hotel occupancy
4. Calculate the charge per day for a given guest
The “Check In” functionality will need the name of the guest, how many people are in their group, and what combination of cars, minibuses and coaches they arrived in. If the party size is more than
2, the program will need to know how many family rooms are required.The program will assign that guest sufficient empty rooms and parking bays for their party. If there are not enough rooms, or not enough parking space, a suitable warning should be given and the user given the option to change some details or abort the check in process.
The “Check Out” functionality will ask for the name of the guest and de-assign the rooms and parking spaces that were allocated to that guest and party.
Answer:
To run the application we will have to compile the cs files that are present in the solution folder.To compile these cs files:-
- Go to the solution folder having cs files. This folder will have the following files:-
- Compile the cs files by using
mcs -out:program.exe Program.cs FuelStation.cs Vehicle.cs Car.cs HGV.cs Van.cs Transaction.cs
Now we will have an exe file with name program.exe in this folder.
- Run the program by using mono program.exe The program will start in the terminal window.
App Synopsis:-
This is a very easy to use application that will help us to evaluate any petrol station. It simulates a petrol station having 3 lanes and each lane has 3 petrol stations. For the purpose of demonstrating the app, some things are hardcoded for now.In this application, we have three types of fuels. Each filling station has all the three types of fuels available at all the times.
- LPG: This is the first type of fuel available. We have hardcoded it proceeds as £ 2.49 for now.Unleaded: This is the second type of available fuel at our filling station. We have hardcoded it proceeds as £ 3.49 for now.Diesel: This is the third type of available fuel at our filling station. We have hardcoded its proceed as £ 4.49 for now.
We have 3 types of Vehicles.
- Car: Car is the first type of vehicle in our application. The car can run on any types of fuel (Diesel, LPG, and Unleaded). We are just randomly choosing which type of fuel to be loaded in the car. The car has a tank capacity of 40 litres. At any time when any car enters the fuelling station, its tank cannot be greater than 10 litres. The amount of fuel that is available in the tank is also randomly decided and is between 0 and 10 litres for a car. Time taken to fill a car's fuel tank depends on the fuel to be filled. In our application, the time to fill 1-litre fuel is 0.3 seconds.
- HGV: HGV is the second type of vehicle in our application. HGV can run on only one type of fuel (Diesel). HGV has a tank capacity of 150 litres. At any time when any hgv enters the fuelling station, its tank cannot be greater than 37.5 litres. The amount of fuel that is available in the tank is also randomly decided and is between 0 and 37.5 litres for an hgv. Time taken to fill an hgv's fuel tank depends on the fuel to be filled. In our application, the time to fill 1-litre fuel is 0.3 seconds.
- Van: Van is the last type of vehicle in our application. Van can run on only two type of fuel (Diesel, LPG). We are just randomly choosing which type of fuel to be loaded in the Van. Van has a tank capacity of 80 litters. At any time when any Van enters the fuelling station, its tank cannot be greater than 20 litres. The amount of fuel that is available in the tank is also randomly decided and is between 0 and 20 litres for a Van. Time taken to fill a Van fuel tank depends on the fuel to be filled. In our application, the time to fill 1-litre fuel is 0.3 seconds.
In our application, a new vehicle is getting generated in a random time interval between 1500 and 2200 seconds. This vehicle must be filled within a service time of less than 1000 to 2000 milliseconds and this time is also randomly chosen for each vehicle. If this vehicle is not serviced within the decided time frame, this vehicle leaves the fuelling station without getting the fuel fill and we add 1 to the counter of vehicles which left the station without getting fuel filled.
Our fuelling station is divided into three lanes having 3 fuelling stations in each lane. These three fuelling stations have all the three types of fuels available at all times. Also, if lane 1 has a vehicle which is getting fuelled at station 1, then the station 2 and 3 are blocked and no vehicle can be serviced there as the vehicles cannot move to those fuelling stations. Similarly, this condition is also valid for the other two lanes.
So if any lane is blocked by any vehicle, then all the filling stations after blocked filling station are inaccessible. Our application displays the Station status as soon as a new vehicle comes or a station becomes available. Then the fuel attendant can simply press the fuel station number and the waiting vehicle will be filled at the selected station. An error message is displayed if the selected fuel station is blocked by some vehicle or it is in use by some other vehicle.
After each filling of the station all the details are displayed on the screen which includes, the current status of the fuelling station i.e. which all stations are currently in use and which all stations are free. It also displays a summary as shown:
Total litres of LPG dispensed: 113
Cost of LPG dispensed (£2.49/L): £281.37
Total litres of Unleaded dispensed: 37
Cost of Unleaded dispensed (£3.49/L): £129.13
Total litres of Diesel dispensed: 0
Cost of Diesel dispensed (£4.49/L): £0
1 % commission: £4.105
Number of vehicles serviced: 04
Number of vehicles left before they were filled out: 6
Press the pump number to service the awaiting vehicle:
So all the vehicles that are currently waiting in a queue are displayed here. There can be a maximum of 5 waiting vehicles at a time. Then it displays the total number of LPG, Unleaded and Diesel dispensed along with the revenue generated by selling them. Then, it displays, the commission of the fuel attendant which is 1% of the total revenue generated by him.
After that, it displays the total number of vehicles that were serviced at this fuelling station followed by the vehicles that were left unserved because of service time constraints.
Testing: -
Various test cases were executed on the application and the results of the test cases are as follows:-
- A new vehicle of random type is generated randomly from 1500 to 2200 milliseconds.
We ran our program multiple times to verify that a new vehicle is randomly generated every 1500 to 2200 milliseconds. This new vehicle type is randomly chosen and this can be of any type between Van, HGV and Car.
Test Result: Pass
- The new vehicle has 0 to not more than its quarter tank filled initially:-
When a new vehicle is generated its tank is randomly filled from 0 litres to not more than a quarter of its tank capacity. This amount is also randomly chosen and generated with the help of the Random object. We tested this scenario by running our application several times and this scenario passes in all the tests that we ran.
Test Result: Pass
- The vehicle is not allowed to get filled if the station has already a vehicle:-
After displaying the current fuelling station on screen, if the user presses fuel station number which is already busy, then a message is displayed to the screen saying that the vehicle cannot be filled at this lane and the control returns again to the user. We have tested this scenario by running the program several times and this scenario passed in all the test cases.
Test Result: Pass
- The vehicle is not allowed to fill if the path to that filling station is blocked.
Suppose that a vehicle is getting fuel filled at lane 1, station number 1 and the user presses the command to fill the vehicle at station number 2. This is not possible as the path to this filling station is already blocked by the vehicle at station number 1. In this case, an error message will be displayed on the screen that the vehicle cannot be filled here and the control returns.
Test Result: Pass
- Unserved vehicles leave the petrol pump:-
For demonstration purpose, we have hardcoded this for now that if a vehicle is not serviced in 1000-2000 milliseconds, then this vehicle leaves the station without getting the fuel filler. This duration can be changed easily at any time.
Test Result: Pass
- All the vehicle details which are filled are stored
We are storing the details of the vehicles that are getting their fuel at this station. These details are getting stored in vehicles list. We are not displaying this list on the screen. But we have already tested and all the vehicle details are present in this list.
References
Dybvig, R., The Scheme Programming Language, MIT Press, 2003.
Hejlsberg, A., The C? Programming Language, AddisBuy MOD003212 The Vehicle Applications Answers Online
Talk to our expert to get the help with MOD003212 The Vehicle Applications Answers to complete your assessment on time and boost your grades now
The main aim/motive of the management assignment help services is to get connect with a greater number of students, and effectively help, and support them in getting completing their assignments the students also get find this a wonderful opportunity where they could effectively learn more about their topics, as the experts also have the best team members with them in which all the members effectively support each other to get complete their diploma assignments. They complete the assessments of the students in an appropriate manner and deliver them back to the students before the due date of the assignment so that the students could timely submit this, and can score higher marks. The experts of the assignment help services at urgenthomework.com are so much skilled, capable, talented, and experienced in their field of programming homework help writing assignments, so, for this, they can effectively write the best economics assignment help services.