import java.util.ArrayList;import java.util.Scanner;class Student { // Define student attributes // ... // Constructor and methods // ...}class StudentDatabase { private ArrayList<Student> students; public StudentDatabase() { students = new ArrayList<>(); } // Methods for adding, displaying, updating, and deleting students // ...}public class StudentManagementSystem { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); StudentDatabase studentDatabase = new StudentDatabase(); int choice; do { // Display menu options System.out.println("1. Add Student"); System.out.println("2. Display All Students"); System.out.println("3. Search Student"); System.out.println("4. Update Student"); System.out.println("5. Delete Student"); System.out.println("6. Exit"); System.out.print("Enter your choice: "); // Read user choice choice = scanner.nextInt(); // Perform actions based on user choice switch (choice) { case 1: // Add Student // ... break; case 2: // Display All Students // ... break; case 3: // Search Student // ... break; case 4: // Update Student // ... break; case 5: // Delete Student // ... break; case 6: System.out.println("Exiting program. Goodbye!"); break; default: System.out.println("Invalid choice. Please enter a valid option."); } } while (choice != 6); // Close the scanner scanner.close(); }}