- Let's first create and configure GridPane to hold our pie charts:
GridPane gridPane = new GridPane(); gridPane.setAlignment(Pos.CENTER); gridPane.setHgap(10); gridPane.setVgap(10); gridPane.setPadding(new Insets(25, 25, 25, 25));
- Create an instance of StudentDataProcessor (which comes from the student.processor module) and use it to load List of Student:
StudentDataProcessor sdp = new StudentDataProcessor(); List<Student> students = sdp.loadStudent();
- Now, we need to get the count of students by their mother's and father's profession. We will write a method, which will take a list of students and a classifier, that is, the function that returns the value on which the students need to be grouped. The method returns an ...