-
Notifications
You must be signed in to change notification settings - Fork 0
Practice Problem 10
Seanti edited this page Mar 26, 2025
·
1 revision
Create a program that allows the user to:
-
Add student names to an
ArrayList. -
Remove a student by name.
-
Display all students in the list.
-
Use a loop to keep asking for actions until the user chooses to exit.
1 - Add Student
2 - Remove Student
3 - Display Students
4 - Exit
Enter your choice: 1
Enter student name: Juan Dela Cruz
Student added!
1 - Add Student
2 - Remove Student
3 - Display Students
4 - Exit
Enter your choice: 1
Enter student name: Maria Santos
Student added!
1 - Add Student
2 - Remove Student
3 - Display Students
4 - Exit
Enter your choice: 3
Students List:
1. Juan Dela Cruz
2. Maria Santos
1 - Add Student
2 - Remove Student
3 - Display Students
4 - Exit
Enter your choice: 2
Enter student name to remove: Juan Dela Cruz
Student removed!
1 - Add Student
2 - Remove Student
3 - Display Students
4 - Exit
Enter your choice: 4
Exiting program.