In javafx please!!!!
Posted: Sun Jul 10, 2022 11:27 am
In javafx please!!!!
1- Implement a Java class HistogramAlphaBet that calculates the frequencies of the alphabet characters in by Leo Tolstoy's "War and Peace" (file War and Peace.tor) and their probabilities. The Histogram AlphaBet class utilizes Map collections, Map Character. Integer> and Map Character, Double> and stream operations, for statistical calculations and sorting of the frequencies and probabilities. It also includes a MyPie Chart class as an inner class. 2- Class MyPie Chart displays a pie chart of the probabilities of the most frequent occurrences of an event - the frequency of characters in a document. The probability of event is given by: Frequency of event Probability of event E Frequencies of all events In the pie chart: i Each event is represented by a slice of the pie chart. The size of the slice is proportional to the probability of the corresponding event: Central angle of slice Probability of event- Each slice has a different color of your choice of type enum MyColor Each slice has a legend showing the corresponding event and its probability; The slices are displayed in order of decreasing probability; The last slice represents "All Other Events and their cumulative probability. As an example, in the graph below where the event is the occurrence of a letter in r in a test: p 3, and the probability of All Other Events is one minus the sum of the probabilities of events e. s, and i ii. iii. ie. B. A other 7002 00000 3- Class MyPie Chart utilizes a Map collection Map-Character, Slice>, and includes appropriate constructors and a method draw that draws the pie chart. The drawing canvas includes appropriate GUI components to input the number of events, n (variable). and display the pie chart together with the characters and their probabilities. 4- Class Slice utilizes the MyAre class in the MyShape class hierarchy, and includes appropriate constructors and methods, including methods that perform the following operations: a.toString-returns a string representation of a Slice object; b. draw-draws a Slice object. 5. You may only use JavaFX graphics and your own classes and methods for the operations included. Further, a. The code is applicable to canvases of variable height and width; b. The size of the pie chart is proportional to the smallest dimension of the canvas. 6- Explicitly specify all the classes imported and used in your Java code
1- Implement a Java class HistogramAlphaBet that calculates the frequencies of the alphabet characters in by Leo Tolstoy's "War and Peace" (file War and Peace.tor) and their probabilities. The Histogram AlphaBet class utilizes Map collections, Map Character. Integer> and Map Character, Double> and stream operations, for statistical calculations and sorting of the frequencies and probabilities. It also includes a MyPie Chart class as an inner class. 2- Class MyPie Chart displays a pie chart of the probabilities of the most frequent occurrences of an event - the frequency of characters in a document. The probability of event is given by: Frequency of event Probability of event E Frequencies of all events In the pie chart: i Each event is represented by a slice of the pie chart. The size of the slice is proportional to the probability of the corresponding event: Central angle of slice Probability of event- Each slice has a different color of your choice of type enum MyColor Each slice has a legend showing the corresponding event and its probability; The slices are displayed in order of decreasing probability; The last slice represents "All Other Events and their cumulative probability. As an example, in the graph below where the event is the occurrence of a letter in r in a test: p 3, and the probability of All Other Events is one minus the sum of the probabilities of events e. s, and i ii. iii. ie. B. A other 7002 00000 3- Class MyPie Chart utilizes a Map collection Map-Character, Slice>, and includes appropriate constructors and a method draw that draws the pie chart. The drawing canvas includes appropriate GUI components to input the number of events, n (variable). and display the pie chart together with the characters and their probabilities. 4- Class Slice utilizes the MyAre class in the MyShape class hierarchy, and includes appropriate constructors and methods, including methods that perform the following operations: a.toString-returns a string representation of a Slice object; b. draw-draws a Slice object. 5. You may only use JavaFX graphics and your own classes and methods for the operations included. Further, a. The code is applicable to canvases of variable height and width; b. The size of the pie chart is proportional to the smallest dimension of the canvas. 6- Explicitly specify all the classes imported and used in your Java code