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

Assignment 13

1. Create a Student class with variables to store student ID, name, batch, and marks in XML, Java, and Python. Include methods to calculate average marks and print student details. 2. Create a StudentTest class with a Student array to store students. Include methods to create students, view all students, and search by ID. 3. The main method displays a menu to create students, search by ID, view all students, or exit the application.

Uploaded by

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

Assignment 13

1. Create a Student class with variables to store student ID, name, batch, and marks in XML, Java, and Python. Include methods to calculate average marks and print student details. 2. Create a StudentTest class with a Student array to store students. Include methods to create students, view all students, and search by ID. 3. The main method displays a menu to create students, search by ID, view all students, or exit the application.

Uploaded by

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

Create class Student in stud package which used to store all details of Student: ID, Name, Batch,

XML_Mark, Java_Mark, Python_Mark


a. Define instance variables to present phone details with appropriate data type
b. Create default constructor to input values for the instance variables.
Validation data :
ID : positive numbe
Name, batch : cannot be blank
The marks (XML, Java, Python) from 0.0 to 10.0
c. Create average() to calculate the average marks of student.
d. Create print() method to print out the details of student in right format (includes : ID, name, XML,
Java, Python and average mark).
Create main class named StudentTest in test package, includes the following members:

a. Variables:
maxStd: the maximum of the Student in the array
nextStd: the number of the actual Student in the array
Student[ ] std: store the list of the Student
b. Write createStudent() method: creates a new student and adds to the array. If the maximum
length of the array is reached then a message is displayed.
c. Write viewAll() method: display all the student array in the right format. If array is empty, displays
appropriate message
d. Write searchStudent(int id) method: find student in batch by ID.

e. In the main method, use the switch-case and loop statements to displays a following menu and
allows exiting the application if only exit function is chosen.
1. Create New Student
2. Search student by ID
3. View all students
4. Exit

You might also like