Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Trojena offers following tourism activities: 1. Ski village. 2. A stunning man-made freshwater lake. 3. 'The Bow' Hotel, an architectural masterpiece that will offer an

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Trojena offers following tourism activities: 1. Ski village. 2. A stunning man-made freshwater lake. 3. 'The Bow' Hotel, an architectural masterpiece that will offer an unrivalled hotel experience; 4. The Vault, a vertical village within the mountain with a fusion of technology, entertainment and hospitality facilities that will provide the main gateway into Trojena. 5. The 'Slope Residences,' which will be located near the ski slope overlooking the lake, designed to blend in with the surrounding landscape, as well as luxurious mansions with panoramic views designed to reflect the beauty of the environment. As a member of a 2-student team your job would be to build Trojena simulation (sim) tool which would help visitors to plan and booking of Trojena activities. Each team would be responsible to develop back-end of this application (sim tool). You will develop a java software to store visitor data and process various requests. Your sim tool reads data as sets of commands from console, in batches, processes this data and computes the total profit for various activities and provide necessary output on console. This tool would use a doubly linked list to implement the various attributes, methods and classes written in the java programming language. I able 1. Package prices tor various activities at the I rojena Your project implements three classes namely Node, DList and Solution. The following provides an API for your project. The following provides an API for Node class. Class DList implements a Doubly Linked List consisting of Nodes from the Node class. The following is the API for the Solution class. This class implements the main method, makes appropriate dat Input/Output calls and implements data structures and all necessary method calls. 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 to 7 . This table shows what each command does. ample Input lere is a sample input ample Output or the above sample input, the following would be printed on the console. 1650 12281110701202342 Mohammad Rajeh 12241111109202233 Mohammad Rajeh xplanation \begin{tabular}{|lllllll} 1 & 1224 & 111 & 11092022 & 3 & 3 & Mohammad Rajeh \\ 1 & 1225 & 112 & 11092022 & 2 & 3 & Mohammad Ali Saleh \\ 1 & 1226 & 113 & 26022023 & 3 & 1 & Ahmed Mohammad \\ 1 & 1227 & 113 & 13022023 & 2 & 3 & Ahmed Mohammad \\ 1 & 1228 & 111 & 07012023 & 4 & 2 & Mohammad Rajeh \end{tabular} For command 1, your program reads: command bookingID tIDtDatetDayzp ID tkame The line ztarting with integer 1 indicates that insert call would be made. No Output is generated for the insert call. Your program preparez 5 nodez containing information for each booking- The first node contains: booking ID =1224 tID=111 tDa te =11092022 tDays=3 PID=3 Name= "Mohammad Rajeh" Once the node iz created, it iz inserted into the Duizt in the appropriate position. Similarly, the other nodez will be created for the rest of the input and inzexted in the lizt. 33 The line starting with integer 3 indicates that the profit method in the Dist would be called. The program computez the profit for all tourz for the package with pID=3. Cuxxently in the lizt, there are 3 nodes with P ID =3. Node with bookingID =1224 for 3 days =650 Node with bookingID =1225 fox 2 day =500 Node with bookingID =1227 fox 2 dayz =500 Hence total profit for pID =3 is 650+500+500=1650 1650 will be displayed on the console 2113 The line ztaxting with integer 2 indicates that the fixst node with tID=113 will be removed from the lizt. No output is genexated. Thiz removes the node that containg the following information 1 1.227113 1302202323 Ahmed Mohammad Note: Date 13022023 appears before 26022023 in the list (starting at head), so it will be removed. The line ztarting with integer 4 indicatez that All tourizts details for tiD=111 will be printed on console separate by new line charactex at the end of each line. 12281110701202342 Mohammad Rajeh 12241111109202233 Mohammad Rajeh Note: Node with tDate=07012023 zhould appear before the node with tDate=11092022 Similar to the above, your program implements the following commands: Legend for the acceptable commands: 1. ingext detail = fox a new node 2. removes node from list 3. computes the profit for a package with pID of ALL tours and displays the total. 4. prints All nodes with pID. 5. prints AII nodez with tDate. 6. prints ALI nodes with tID. 7. prints the node with bookingID. NOTE: If no output is generated, your program prints 0 on the console

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions