Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this project, you will be using java to develop a theme park management software that will improve the park's visitors' information system. The theme
In this project, you will be using java to develop a theme park management software that will improve the park's visitors' information system. The theme park has one cntrance gate, one cxit gate, and 4 kingdoms with their internal gates. Visitors are allowod to visit these kingdoms in any order they want by scanning their bracelets in each kingdom gate. However, for marketing purposes, to be able to exit the park, they have to revisit these kingdoms in reverse order in their way out. For example, a visitor who visit kingdoms: 1,2,3, then 4 should scan their bracelets in their way out using the exit gates of kingdoms 4,3,2, then 1 . Also, visitors can visit all kingdoms or any number of kingdoms they want. The program will read as an input the visitors' information from a text file (provided in .txt format), store it in the main memory, to facilitate the performance of several operations. Each visitor information includes the following: - First Name and Last Name, as Strings, - Pass Type as Boolean where 1 indicates a VIP pass holder and 0 indicates a regular pass holder, - Phone number as a String of length 10 , - Region as integer indicating the region number a visitor comes from. - The order of the kingdoms visited as integers. Note: A region refers to an area that is part of the country. For example, in Saudi Arabia the regions would be Central, Eastern, Northern, ..etc., However, these regions will be dealt with as numbers (region (1), region (2), ..etc) instead of the names of the regions. Kingdoms on the other hand refer to the areas inside the theme park. Therefore, the main task of this project is to design a suitable ADT (call it, ThemeParkADT) to store the visitors' information and enable the following operations to be performed as fast as possible: 1. An operation to find visitors based on their last name: this function will be used to pull out visitors" information using the last name 2. An operation to display the total number of regions visitors are coming from. 3. An operation to display the regions along with their number of visitors sorted by the total number of visitors from this region (sorted in descending order). 4. An operation to display the number of visitors holding VIP passes from a specific region. 5. An operation to display the current location of all visitors holding VIP passes. 6. An operation to check whether two VIP pass holder visitors from the same region, given their phone number, are currently in the same kingdom. Note: If the given visitors or one of them ure not VIP pass holders, retum false and display an informative message indicating that. 7. An operation to check whether two regular visitors from the same region, given their phone number, visited the kingdoms in the surne order. The operation will retum true if and only if the two visitors visited the same number of kingdoms in the same order. Note: If the given visitors or one of them are not regular pass holders, or do not come from the same region, retum false and display an informative message indicating that. Fxnmple: Consider the following tex! Gile: Phase 1: (10 marks) (Nole the variables are separated by "," abd ench visiror's information is ' 'ritten in a sepparate line in the given format: FintName, LastName. Region, In the first phase of the project, you are asked to deskrihe ynur suggested design af the ADT Pboile:-umber, ordet] tur the proiblem dewerihed ahove and perfistri the following tasks: a) Give a graphical representation of the ADI to show its structure. Make sure to label the ciagram clearly. The output of each of the T operations are as follows: b) Wrate at least one paragraph deseribing sous diagran from part (a). Make sure to clearly explain each contpoocent in yout design. Also, discuss abd justify the choiess and the nssumptions you make. c) Give a specilieation of the vperations (1), (2), (3), (4). (5), (6), and (7) as well as any wher supperting operntions you may need to read the text from a text file and sroce the results in the ATJT (e gn insert). d) Pruwibe the time complexity (worst ease analysis) lor all the operations discessed aheye using Big O notation. Assune that the nazber of visitors is n4 the number of VIP perss holders is v, and the numher of regular pass holders is go, and the number of regions is r. Phase 2i.(15 Marks) After st:hmirting Phase 1 , you will be provided with a graphical representation of the ADT that you are supposed to use in Phase 2. In the seeund phase of the projech you will implement the provided ADT and the operations speciliod in the first phase using Jasa programming labguage. Your program should cootain a Mnin class that reads a specified texr file nnd perform ench of the seven operntions that are described in this assignmenc, You will he asked to run a demn of your program ard yenerate output using several test cases provided by the instructor. Failure to shos far yuur deme will result in reveiving ZERO for this phase. Important notes - - All data stoctures used in this assignuent iuast be iuplenecated by the stadeuts and any use of lavi collections ar any other libraries is strictly fothidden (you may only use the ADIs you bave studied in the course). - The progrnm should implement the provided ADV, Implenenting other representarions will not be avcented. Subzission Guidelines - You are expected to work in teans, cach tean ruast coatain 5 studcats. - For Phase 1, submit a mritten repart (in PDF format) answering the given questions to your instructor through LMS. Your report should include the names and the IDs of your team's incinber. - For Phase 2, sabanit soua seures code (contpressed in ZLP fornaf) threagh LMS. In sddition, make sure to bring your I.APTOP, so you can present a demo of your work to your instructor. In this project, you will be using java to develop a theme park management software that will improve the park's visitors' information system. The theme park has one cntrance gate, one cxit gate, and 4 kingdoms with their internal gates. Visitors are allowod to visit these kingdoms in any order they want by scanning their bracelets in each kingdom gate. However, for marketing purposes, to be able to exit the park, they have to revisit these kingdoms in reverse order in their way out. For example, a visitor who visit kingdoms: 1,2,3, then 4 should scan their bracelets in their way out using the exit gates of kingdoms 4,3,2, then 1 . Also, visitors can visit all kingdoms or any number of kingdoms they want. The program will read as an input the visitors' information from a text file (provided in .txt format), store it in the main memory, to facilitate the performance of several operations. Each visitor information includes the following: - First Name and Last Name, as Strings, - Pass Type as Boolean where 1 indicates a VIP pass holder and 0 indicates a regular pass holder, - Phone number as a String of length 10 , - Region as integer indicating the region number a visitor comes from. - The order of the kingdoms visited as integers. Note: A region refers to an area that is part of the country. For example, in Saudi Arabia the regions would be Central, Eastern, Northern, ..etc., However, these regions will be dealt with as numbers (region (1), region (2), ..etc) instead of the names of the regions. Kingdoms on the other hand refer to the areas inside the theme park. Therefore, the main task of this project is to design a suitable ADT (call it, ThemeParkADT) to store the visitors' information and enable the following operations to be performed as fast as possible: 1. An operation to find visitors based on their last name: this function will be used to pull out visitors" information using the last name 2. An operation to display the total number of regions visitors are coming from. 3. An operation to display the regions along with their number of visitors sorted by the total number of visitors from this region (sorted in descending order). 4. An operation to display the number of visitors holding VIP passes from a specific region. 5. An operation to display the current location of all visitors holding VIP passes. 6. An operation to check whether two VIP pass holder visitors from the same region, given their phone number, are currently in the same kingdom. Note: If the given visitors or one of them ure not VIP pass holders, retum false and display an informative message indicating that. 7. An operation to check whether two regular visitors from the same region, given their phone number, visited the kingdoms in the surne order. The operation will retum true if and only if the two visitors visited the same number of kingdoms in the same order. Note: If the given visitors or one of them are not regular pass holders, or do not come from the same region, retum false and display an informative message indicating that. Fxnmple: Consider the following tex! Gile: Phase 1: (10 marks) (Nole the variables are separated by "," abd ench visiror's information is ' 'ritten in a sepparate line in the given format: FintName, LastName. Region, In the first phase of the project, you are asked to deskrihe ynur suggested design af the ADT Pboile:-umber, ordet] tur the proiblem dewerihed ahove and perfistri the following tasks: a) Give a graphical representation of the ADI to show its structure. Make sure to label the ciagram clearly. The output of each of the T operations are as follows: b) Wrate at least one paragraph deseribing sous diagran from part (a). Make sure to clearly explain each contpoocent in yout design. Also, discuss abd justify the choiess and the nssumptions you make. c) Give a specilieation of the vperations (1), (2), (3), (4). (5), (6), and (7) as well as any wher supperting operntions you may need to read the text from a text file and sroce the results in the ATJT (e gn insert). d) Pruwibe the time complexity (worst ease analysis) lor all the operations discessed aheye using Big O notation. Assune that the nazber of visitors is n4 the number of VIP perss holders is v, and the numher of regular pass holders is go, and the number of regions is r. Phase 2i.(15 Marks) After st:hmirting Phase 1 , you will be provided with a graphical representation of the ADT that you are supposed to use in Phase 2. In the seeund phase of the projech you will implement the provided ADT and the operations speciliod in the first phase using Jasa programming labguage. Your program should cootain a Mnin class that reads a specified texr file nnd perform ench of the seven operntions that are described in this assignmenc, You will he asked to run a demn of your program ard yenerate output using several test cases provided by the instructor. Failure to shos far yuur deme will result in reveiving ZERO for this phase. Important notes - - All data stoctures used in this assignuent iuast be iuplenecated by the stadeuts and any use of lavi collections ar any other libraries is strictly fothidden (you may only use the ADIs you bave studied in the course). - The progrnm should implement the provided ADV, Implenenting other representarions will not be avcented. Subzission Guidelines - You are expected to work in teans, cach tean ruast coatain 5 studcats. - For Phase 1, submit a mritten repart (in PDF format) answering the given questions to your instructor through LMS. Your report should include the names and the IDs of your team's incinber. - For Phase 2, sabanit soua seures code (contpressed in ZLP fornaf) threagh LMS. In sddition, make sure to bring your I.APTOP, so you can present a demo of your work to your instructor
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started