Question: I need help to solve Slist and command ! all the information is attached below begin{tabular}{|l|l|l|l|} hline rID & ReservationType & Price Per night &

I need help to solve Slist and command ! all the information is attached below

I need help to solve Slist and command ! all the information

is attached below \begin{tabular}{|l|l|l|l|} \hline rID & ReservationType & Price Per night& Loyalty points per night \\ \hline 1 & Premium Rooms &800 SAR & 200 \\ \hline 2 & Villas & 2000 SAR

\begin{tabular}{|l|l|l|l|} \hline rID & ReservationType & Price Per night & Loyalty points per night \\ \hline 1 & Premium Rooms & 800 SAR & 200 \\ \hline 2 & Villas & 2000 SAR & 500 \\ \hline 3 & ServicedApartments & 1500 SAR & 350 \\ \hline \end{tabular} Your project implements three classes namely Node, SList and Solution. The following nrovides an API for vour nroiect classes. Clace SI ict imnlements a Sinlov I inked I ist concietino of Nodes from the Node clace The following is the API for the Solution class. This class implements the main method, makes appropriate data Innut/Outnut calls and imnlements data structures and all necessarv method calls. F When your program starts, it reads a set of commands (each on a separate line) followed by some input (optional) from the console and generates appropriate output, to be displayed on the console. The command takes an integer value 1,2,3,4,5,6 or 7 . This table shows what each command does. Sample Input Here is a sample input 1111145267SampleOutput12251226122712281229122510310310110110110210310310112132100920211009202122022022140220220901202232234AhmedSamehMohammadAhmedMohamedAhmedBaloshiAhmedBaloshiAhmedSamehMohammad For the above sample input, the following would be printed on the console. 2400 6100 1229101090120214 Ahmed Sameh Mohammad 1225101100920217 Ahmed Sameh Mohammad Explanation Similar to the above, your program implements the following commands: Legend for the acceptable commands : 1. insert details for a new node 2. removes node with the first occurrence of a given vID from list 3. removes all nodes with a given vID from list 4. computes the cost for a booking with bookingID and displays the total. 5. computes the cost for all the bookings with vID and displays the total. 6. computes the loyalty points for all the nodes with vID for all of his/her reservations. 7. prints All nodes with vID. 8. prints ALL nodes with bookingID. 9. prints ALL nodes with expectedDate. NOTE: If no output is generated, your program prints o on the console

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!