Question
This is created with java Use objects of ListIterator and while loop insted of for loops. The Student class contains instance data about the student's
This is created with java
Use objects of ListIterator and while loop insted of for loops.
The Student class contains instance data about the student's first and last name, username and E-mail. Create a constructor to receive first and last name input. Then get methods to retrieve first and last name and get methods for username and email. GIK299 The username is created as follows: h=autumn, 22=start year, first three letters i first name, first three letters of last name. For example, the username becomes Kalle Nilsson who started in autumn 2022: h22kalnil. This username is created and returned of method getUserName where you use the String class's substring method to extract the letters from the first or last name. The Calendar class and its get method to get the year. IN the getEmail method creates and returns email according to the same pattern as for username but with the addition of an "@" and that you end with du.se. e.g.: h22kalnil@du.se B. Create GUI with appropriate text fields, text labels, text area and buttons according to D. below. C. In your JFrame class, you create an array list. Initialize that array list so that it already from the beginning has three student objects in it. D. You wire event methods for the buttons that perform the functionalities (as described more detailed below under functionality): to add, update, delete, search by surname, show all, sort by last name, scroll back and forth between the different students in the array list. Functionality: 1) Create a private method that lists all the students in the array list in the text area. It will called on show all, add, remove and update to present what is in the array list after the changes are made. Use the ListIterator class and while loop. 2) Adding student to the array list. 3) Update information about student based on username. 4) Remove student based on username. 5) Search by surname and list all students with the searched surname. Printing must also take place in a JLabel that indicates how many students there are with the requested item the last name. 6) Display all the information about all the students contained in the array list in the text area. 7) Sort by students' last names implement the Comparator class. 8) "Browse buttons" so that you can go back and forth in the array and it should are presented in the text fields that should show info about the student currently have browsed to. Inspired by task 4 above where you "scroll/go" forward and back between different circles.
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