Linked Lists – using Java's built-in LinkedList class.
Write a Java class named StudentEmail that has data members for the name and number of a student. The class should have a constructor and appropriate accessor and mutator methods. In addition, the toString method should include the output information with student name, student number and the corresponding e-mail address. The e-mail address is a string with the student number and @my.email (such as s123@my.email). Then you write a program that creates a GUI with two labelled text fields, each one for name and student number, a text area to display the information, and four buttons:
• Add: when the user enters data into the text fields and clicks the ‘add’ button, a StudentEmail object is created and stored in a LinkedList, and in then the student name, number and e-mail is displayed on the text area.
• Delete: If you want to delete a student e-mail entry, you can enter the student name in the text field and press the ‘delete’ button. If the entered student name doesn’t match any name in the LinkedList, a dialog message box will pop up to indicate this.
• Display All: Clicking ‘display all’ button will display all data (StudentEmail object) that are stored in the linkedlist.
• Exit: Pressing ‘exit’ button will allow users to exit the program.
• Add Edit functionality, a application title, center the error dialogs in the applications window, and other improvements.
-
Java - LinkedLists - Students GUI - Add, Delete, Display - Part 01:
https://www.youtube.com/watch?v=0KdG9DZgi6I -
Java - LinkedLists - Students GUI - Add, Delete, Display - Part 02:
https://www.youtube.com/watch?v=LXMg1E6gJJ0
If you'd like to learn more about Linked Lists, see my 2 part special:
-
LinkedList - From Scratch - Part 1 of 2:
https://youtu.be/BuntNoC8Cq0 -
LinkedList - From Scratch - Part 2 of 2 here:
https://youtu.be/WdXKpOIEzoo
EOF.