Answered step by step
Verified Expert Solution
Link Copied!

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

1
COMP242 ProjectIII
In this project, you will implement a new martyrs data structure using AVL tree, Hash Table,
Queues/Stacks, 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. i.e. if 2 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 11, if half full do rehash/resize
the table (e.g. new hash table size =1st prime after [2* 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 2 fields: The district and full name i.e. first we compare by district and if equals we
compare by name.
The data input for this project will be a martyrs csv file (data.csv attached)
For a good user experience, you will need to implement a graphical user interface (GUI) using javaFX.
2
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 line-by-line 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:
1. An option to insert new date to the hash table.
2. An option to update a date record.1
3. An option to delete a date record.1
4. An option to print the hash table from top to bottom including/excluding the empty spots.
5. 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
6. An option to load the current selected dates AVL into martyrs screen.
Martyrs Screen: in this screen we need the following:
1. An option to insert new martyr into AVL tree.
2. An option to update a martyrs info.
3. An option to delete a martyr.1
4. An option to show the tree size and height.
5. An option to print the tree level-by-level and from right to left.
6. An option to print the martyrs in a table sorted by age. Use heap-sort 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.
1Show 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 10/5/200148 Hebron Hebron M)

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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions