Car Reservation

Download Category:

CarReservation.zip - (166.33 KB)
[
CarReservation/_UpgradeReport_Files/
CarReservation/_UpgradeReport_Files/UpgradeReport.css
CarReservation/_UpgradeReport_Files/UpgradeReport.xslt
CarReservation/_UpgradeReport_Files/UpgradeReport_Minus.gif
CarReservation/_UpgradeReport_Files/UpgradeReport_Plus.gif
CarReservation/Backup/
CarReservation/Backup/CarReservation.sln
CarReservation/Backup/CarReservation.suo
CarReservation/Backup/CarReservation/
CarReservation/Backup/CarReservation/CarReservation.Designer.vb
CarReservation/Backup/CarReservation/CarReservation.resx
CarReservation/Backup/CarReservation/CarReservation.vb
CarReservation/Backup/CarReservation/CarReservation.vbproj
CarReservation/Backup/CarReservation/CarReservation.vbproj.user
CarReservation/Backup/CarReservation/My Project/
CarReservation/Backup/CarReservation/My Project/Application.Designer.vb
CarReservation/Backup/CarReservation/My Project/Application.myapp
CarReservation/Backup/CarReservation/My Project/AssemblyInfo.vb
CarReservation/Backup/CarReservation/My Project/Resources.Designer.vb
CarReservation/Backup/CarReservation/My Project/Resources.resx
CarReservation/Backup/CarReservation/My Project/Settings.Designer.vb
CarReservation/Backup/CarReservation/My Project/Settings.settings
CarReservation/CarReservation.sln
CarReservation/CarReservation.suo
CarReservation/CarReservation/
CarReservation/CarReservation/bin/
CarReservation/CarReservation/bin/Debug/
CarReservation/CarReservation/bin/Debug/CarReservation.exe
CarReservation/CarReservation/bin/Debug/CarReservation.pdb
CarReservation/CarReservation/bin/Debug/CarReservation.vshost.exe
CarReservation/CarReservation/bin/Debug/CarReservation.vshost.exe.manifest
CarReservation/CarReservation/bin/Debug/CarReservation.xml
CarReservation/CarReservation/bin/Debug/reservations.txt
CarReservation/CarReservation/bin/Release/
CarReservation/CarReservation/CarReservation.Designer.vb
CarReservation/CarReservation/CarReservation.resx
CarReservation/CarReservation/CarReservation.vb
CarReservation/CarReservation/CarReservation.vbproj
CarReservation/CarReservation/CarReservation.vbproj.user
CarReservation/CarReservation/My Project/
CarReservation/CarReservation/My Project/Application.Designer.vb
CarReservation/CarReservation/My Project/Application.myapp
CarReservation/CarReservation/My Project/AssemblyInfo.vb
CarReservation/CarReservation/My Project/Resources.Designer.vb
CarReservation/CarReservation/My Project/Resources.resx
CarReservation/CarReservation/My Project/Settings.Designer.vb
CarReservation/CarReservation/My Project/Settings.settings
CarReservation/CarReservation/obj/
CarReservation/CarReservation/obj/CarReservation.vbproj.FileList.txt
CarReservation/CarReservation/obj/Debug/
CarReservation/CarReservation/obj/Debug/CarReservation.CarReservationForm.resources
CarReservation/CarReservation/obj/Debug/CarReservation.exe
CarReservation/CarReservation/obj/Debug/CarReservation.pdb
CarReservation/CarReservation/obj/Debug/CarReservation.Resources.resources
CarReservation/CarReservation/obj/Debug/CarReservation.vbproj.FileListAbsolute.txt
CarReservation/CarReservation/obj/Debug/CarReservation.vbproj.GenerateResource.Cache
CarReservation/CarReservation/obj/Debug/CarReservation.xml
CarReservation/CarReservation/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
CarReservation/CarReservation/obj/Debug/GenerateResource.read.1.tlog
CarReservation/CarReservation/obj/Debug/GenerateResource.write.1.tlog
CarReservation/CarReservation/obj/Debug/TempPE/
CarReservation/CarReservation/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll
CarReservation/CarReservation/obj/Release/
CarReservation/Screenshot2.JPG
CarReservation/UpgradeLog.XML
]

Create an application that allows a user to reserve a car for the specified day. A small car-reservation company can rent out only four cars per day. Let the application allow the user to specify a certain day. If four cars have already been reserved for that day, then indicate to the user that no vehicles are available.
What needs to be done
(1) Add a monthCalendar control to the form – drag and drop a monthCalendar control on the form. Set its names property to dateMonthCalendar.
(2) Importing System.IO namespace – Import namespace System. IO to allow file processing.
(3) Determining the number of reservations – create a method named NumberOfReservations that takes one argument of type Date. The procedure should use a LINQ that searches the reservations.txt file for reservations made for the selected date. The procedure should return the number of cars rented for the day selected. (HINT) Use the query result’s Count method to determine the number of elements in the result.
(4) Defining a sub procedure – create a sub procedure named checkReservations. This procedure should invoke the NumberOfReservations method, passing in the user selected day as an argument. the CheckReservations method should then retrieve the number returned by NumberOfReservations and determine whether four cars have been rented for that day . if four cars have been rented, then display a message dialog to the user stating that no cars are available that day for rental. If fewer than four cars have been rented for that day, create a StreamWriter object, passing reservations.txt as the first argument and True as the second argument to specify that data should be appended to any existing data. Write the day and the user’s name to the reservations.txt file and display a message dialog to the user stating that a car has been reserved.
(5) Define the reserveButton_Click event handler. Double click the Reserve Car Button to create the reserveButton_Click ecent handler. In the event handler, invoke the CheckReservations procedure and clear the Name: TextBox.

Write a Review

Get a fresh solution of this question. Ask it now to our experts.
doubt

Ask Your Question

We have verified professionals who are ready to answer your question.

time

Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.

download

Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.