0% found this document useful (0 votes)
2 views

Activity - Student Menu with Collection

The document outlines the creation of a Student class in Java with private properties such as rollno, name, grade, and dob, along with a static counter for automatic roll number generation. It also describes a main method in a separate Java file that presents a menu with seven options for managing student records, including creating, displaying, updating, and deleting student information. The program will continue to prompt the user until they choose to exit by selecting option 7.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Activity - Student Menu with Collection

The document outlines the creation of a Student class in Java with private properties such as rollno, name, grade, and dob, along with a static counter for automatic roll number generation. It also describes a main method in a separate Java file that presents a menu with seven options for managing student records, including creating, displaying, updating, and deleting student information. The program will continue to prompt the user until they choose to exit by selecting option 7.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Create a Student class with properties like rollno, name, grade and dob, generate the rollno

automatically with some static counter in Student, Make all variables private and access them
through setters & getters

Create a main method to display the menu with 7 options as below:-

Note: Create main method in a separate java file

1: Create Student 2: Display Student by Id 3: Display All

4: Update Grade 5: Delete Student by Id 6: Students Count

7: Exit

Maintain all the students in a Collection, below are the working of menu options

Option 1: You ask student details like name, grade & dob

Option 2: You ask roll no and display RollNo, Name, Grade & dob

Option 3: You display all the students stored in the array

Option 4: You ask rollNo and Grade and update the grade matching to rollNO

Option 5: You ask rollNo and initialize the existing object to null

Option 6: It will display student counts in the array

Option 7: You will exit & print thank you

Repeat the options until you enter 7

You might also like