Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 COMP 2 4 2 ProjectIII In this project, you will implement a new martyrs data structure using AVL tree, Hash Table, Queues / Stacks
COMP ProjectIII
In this project, you will implement a new martyrs data structure using AVL tree, Hash Table,
QueuesStacks and Heap. The following figure shows the overall martyrs data structure:
Note the following in this data structure:
Main Hash Table: this hash table holds unique date records. Each date record in this tree
consists of a date, flag E: empty, F:full, and D:deleted and a Martyrs AVL tree. This hash table
combines the separate chaining and quadratic probing techniques in one. ie if martyrs
records has the same date, they both will be inserted into the same hash nodes AVL tree. If a
new martyr records date map to a full location in hash table, the quadratic probing technique
will be used to find the next empty spot. The initial table size is if half full do rehashresize
the table eg new hash table size st prime after old hash table size
Martyrs AVL Tree: this AVL tree holds all martyr records whom died in the same date. The tree
is sorted by fields: The district and full name ie first we compare by district and if equals we
compare by name.
The data input for this project will be a martyrs csv file datacsv attached
For a good user experience, you will need to implement a graphical user interface GUI using javaFX.
When running your project, at first, the user has to load the martyrs file using a file chooser. Your program
has to read the file linebyline and fill the martyrs data structure appropriately.
Then the user will be provided by the Date screen as follow:
Date Screen:in this screen we need the following:
An option to insert new date to the hash table.
An option to update a date record
An option to delete a date record
An option to print the hash table from top to bottom includingexcluding the empty spots.
Navigate throw the hash table from top to bottom. The navigation has to have an option to go up date
and go down date While navigate over dates show the following:
a Martyrs summary total average, etc.
b District that has the maximum martyrs
c Location that has the maximum martyrs
An option to load the current selected dates AVL into martyrs screen.
Martyrs Screen: in this screen we need the following:
An option to insert new martyr into AVL tree.
An option to update a martyrs info.
An option to delete a martyr
An option to show the tree size and height.
An option to print the tree levelbylevel and from right to left.
An option to print the martyrs in a table sorted by age. Use heapsort to sort by age.
Important:
To enter dates, use DatePicker. To enter District or Location, choose from a combo box.
To enter gender use radio buttons
All the operations should consider the data from the created data structure.
Add an option to save the updated data structure to a new file in the same format of the input file.
Show a warning and a confirmation dialog before performing this action.here is a sample of the martyr record : Name event Age location District Gender
Qassem Abu 'Afifi Hebron Hebron M
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