JavaFX Student Database (20 marks / 4%) In this assignment you'll create an JavaFx application that...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
JavaFX Student Database (20 marks / 4%) In this assignment you'll create an JavaFx application that allows the user to enter and sort a student database. You'll be creating a JavaFx GUI, and get some experience using abstract classes and interfaces. Student Class Implement a class called Student to store student information. Your class should be based on the abstract class Person provided with this assignment. In addition to the inherited fields and methods, include the following fields/methods: . A field to store the student's GPA An implementation for the abstract method currentStatus. This could simply return the string "Student". A toString method that includes the GPA and follows the format of Person.toString. Hint: You could call the superclass to do most of the work. Any required getters or setters You'll be using your Student class in a list of students created by your GUI. JavaFx GUI Create an JavaFx application which allows you to enter student information. Your GUI should have one activity with the following components: Text fields to enter the student's name, address, and GPA Buttons (Button) to add a new student, sort the list of students, and display the list of students. Any required labels or other items to make your GUI look good and be easy to use. The following image shows a possible GUI design, but this is just a fairly boring example, design your GUI in the way you think is best. Student Information Name: Address: GPA: Add Sort Display You should use an ArrayList of Student objects to store your list of students. The Add button adds a new student to the end of the list, the sort button sorts your list of students by name, and the display button shows a simple popup dialog containing a list of all students' information (student info provided by the toString method). Popup Dialog Create a second scene and set the modality as follows: Stage second Stage = new Stage(); second Stage.initModality (Modality. APPLICATION_MODAL); secondStage.setScene (scene); Sorting Your ArrayList To sort your list of students you can use the Collections.sort method from the Java library. For this to work you must implement the Comparable interface for the objects being sorted. A good place to put the Comparable interface implementation is in the Person class, since we are sorting by name (a field of the Person class). Update the class I provided. JavaFX Student Database (20 marks / 4%) In this assignment you'll create an JavaFx application that allows the user to enter and sort a student database. You'll be creating a JavaFx GUI, and get some experience using abstract classes and interfaces. Student Class Implement a class called Student to store student information. Your class should be based on the abstract class Person provided with this assignment. In addition to the inherited fields and methods, include the following fields/methods: . A field to store the student's GPA An implementation for the abstract method currentStatus. This could simply return the string "Student". A toString method that includes the GPA and follows the format of Person.toString. Hint: You could call the superclass to do most of the work. Any required getters or setters You'll be using your Student class in a list of students created by your GUI. JavaFx GUI Create an JavaFx application which allows you to enter student information. Your GUI should have one activity with the following components: Text fields to enter the student's name, address, and GPA Buttons (Button) to add a new student, sort the list of students, and display the list of students. Any required labels or other items to make your GUI look good and be easy to use. The following image shows a possible GUI design, but this is just a fairly boring example, design your GUI in the way you think is best. Student Information Name: Address: GPA: Add Sort Display You should use an ArrayList of Student objects to store your list of students. The Add button adds a new student to the end of the list, the sort button sorts your list of students by name, and the display button shows a simple popup dialog containing a list of all students' information (student info provided by the toString method). Popup Dialog Create a second scene and set the modality as follows: Stage second Stage = new Stage(); second Stage.initModality (Modality. APPLICATION_MODAL); secondStage.setScene (scene); Sorting Your ArrayList To sort your list of students you can use the Collections.sort method from the Java library. For this to work you must implement the Comparable interface for the objects being sorted. A good place to put the Comparable interface implementation is in the Person class, since we are sorting by name (a field of the Person class). Update the class I provided.
Expert Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Your task is to build upon your calendar from Assignment 1 to fix a few things and add more functionality to your program. (****************************************** HERE IS ASSIGNMENT 1 THAT WE ARE...
-
Suri recently took a job in the marketing department for All Access Cable Company. After just a few days on the job. After just a few days on the job, Suri learned that the company has many layers of...
-
A major challenge in implementing the "hydrogen economy" is finding a safe, lightweight, and compact way of storing hydrogen for use as a fuel. The hydrides of light metals are attractive for...
-
The diagram shows the arrangement of the outer electrons only in a molecule of ethanoic acid. a. Name the different elements found in this compound. b. What is the total number of atoms present in...
-
Consider a shield with an emissivity of \(\epsilon_{\mathrm{s}}\) separating two parallel plates as shown in Fig. 19.11. Assume that the shield is adiabatic and that there is no net loss of heat....
-
To what extent does the development of new technologies simplify and routinize the job of employees? Can you give an example? How can new technology lead to job enlargement? Discuss.
-
Lazaro currently makes $90,000 per year and goes skydiving 99 times per year. His income elasticity of demand for skydiving is, = 1.3. a. Explain in words what is meant by, = 1.3. b. What percentage...
-
A sealed vessel contains a mixture of 956 g of trichloromethane chcl3 also called chloroform and 230 .g of ethanol ch3ch2oh.At 30-degree Celcius assume that their vapor pressures are 36.0 kpa and...
-
The oligopolist ____________ at the minimum point of her ATC curve.
-
An oligopoly is an industry with _____________________ .
-
One measure of the degree of competitiveness (or of oligopoly) is called a(n) ________.
-
College textbook publishing is most accurately described as _______. a) a duopoly b) a cutthroat oligopoly c) open collusion d) a cartel
-
A matrix, which has only a few nonzero elements, is said to be __________.
-
Norah Baines is one of the most devoted teachers at Oakwood Academy. She has been working with the institution for seven years and is expecting a promotion soon. However, Norah's candidacy for this...
-
Whats the difference between an ordinary annuity and an annuity due? What type of annuity is shown below? How would you change the time line to show the other type of annuity?
-
Show that for real numbers \(\alpha, \beta\), and \(\delta\) the matrices form a group under matrix multiplication. Show that the matrices \(G\) with \(\alpha=\beta=0\) form an invariant subgroup of...
-
Show that the quotient group of the 4-group \(\mathrm{D}_{2}\) defined in Problem 2.9 is \(\mathrm{C}_{2}\).
-
Prove that the angular momentum operator \(L_{z}\) generates rotations around the \(z\)-axis.
Study smarter with the SolutionInn App