Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this project, you will implement an Electricity data structure using combined AVL trees. The figure that i gave shows the overall data structure, i
In this project, you will implement an Electricity data structure using combined AVL trees. The figure that i gave shows the overall data structure, i need to read from a file that has this format
Date LinesMWs PowerPlantMWs secondLinesMWs TotaldailySupplyavailableinMWs OveralldemandinMWs PowerCutshoursdaymgandTemp each one separated by a comma
now it will need to skip the first line in the file and then read the date and using the date it will create an AVL tree for the years, inside of it will be another AVL tree called months, and inside will be another AVL tree called days, in inside each day will have an object containing the rest of the data,
my question is how will i make a program that will read all this and create it as it reads the file and not have it pre built
heres the project and heres the image
YOU MAY NOT USE ARRAYS or ARRAYLIST IN THIS PROJECT.
For a good user experience, you will need to implement a graphical user interface GUI using javaFX.
YOU MAY NOT USE SCENE BUILDER IN THIS PROJECT.
At the beginng, the user has to load the electricity file using a file chooser.Then the user will get a list of
functions to choose from:
Mangement Screen:
An option to insert new electricity record.
An option to update anelectricity record.
An option to delete an electricity record.
An option to search for an electricity record by date.
An option to traverseprint Years Tree and Months Tree and Days Tree level by level.
An option to display the height of Years Tree and Months Tree and Days Tree.
Note: use a calendar GUI for anything related to date.
Statistics Screen:
An option to show statistics for:
a A specific electricity statistic for a given day across all months and years
b A specific electricity statistic for a given month across all days and years
c A specific electricity statistic for a given year across all days and months
d A total statistic for all data. Note: statistics include at least: totalsum average,
maximum, and minimum
Note: all the above functionalities should obtain the data from the combined trees data structure.
Save Screen: in this screen, you will have an option to save the updated trees back to a new file
in the same format as input file separated by comma
Use a file chooser to select the folder to save the new file in
i need it to be with as minimal of a time complexity as possidle
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