Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Give a graphical representation of the ADT Array to show its structure. Make sure to label the diagram clearly. In this project, you will be

Give a graphical representation of the ADT "Array" to show its structure. Make sure to label the diagram clearly.

In this project, you will be using java to develop a theme park management software that will improve the parks visitors information system. The theme park has one entrance gate, one exit gate, and 4 kingdoms with their internal gates. Visitors are allowed 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 are not VIP pass holders, return 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 same order. The operation will return 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, return false and display an informative message indicating that.

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

Big Data And Hadoop Fundamentals Tools And Techniques For Data Driven Success

Authors: Mayank Bhushan

2nd Edition

9355516665, 978-9355516664

More Books

Students also viewed these Databases questions