Hi,

I have developed this student class which is below. I created a StudentTester class which was very basic in that it asked a student already written in the code to enter his marks for maths, English and science and calculate the average mark.

Like this:

Raul Bonano, Please enter your mark for maths
20
Raul Bonano, Please enter your mark for english
20
Raul Bonano, Please enter your mark for science
20

Student no. is 234444
Student name is Raul Bonano
Maths mark is 20
English mark is 20
Science mark is 20
The average mark is 20.0

the student class:

Code:

public class Student
{
//The attributes
private String studentNumber;
private String studentName;
private int markForMaths;
private int markForEnglish;
private int markForScience;

//The methods

//The constructor
public Student (String numberIn, String nameIn)
{
studentNumber = numberIn;
studentName = nameIn;
}
//Methods to read the attributes
public String getStudentNumber()
{
return studentNumber;
}
public String getStudentName()
{
return studentName;
}


public void enterMarks(int mathsIn,int engIn, int sciIn)
{
markForMaths = mathsIn;
markForEnglish = engIn;
markForScience = sciIn;
}

public int getMathsMark()
{
return (markForMaths);
}
public int getEnglishMark()
{
return (markForEnglish);
}
public int getScienceMark()
{
return (markForScience);
}

public double calculateAverageMark()
{
return (markForMaths + markForEnglish + markForScience)/3.0;
}
}



I now want to take this implementation of the student class and use an array to develop a StudentList class. The UML diagram StudentList object and a Student object is below:

Student
studentNumber: String
studentName: String
markForMaths:int
markForEnglish:int
markForScience:int

Student(String, String)
getNumber(): String
getName(): String
enterMarks(int, int, int)
getMathsMark():int
getEnglishMark():int
getScienceMark():int
calculateAverageMark():double

Student List

list: Student[ ]
Total: int

StudentList(int)
add(Student); boolean
remove(int):boolean
isEmpty( ):boolean
isFull( ):Boolean
getItem(int): Student
getTotal( ):int

This is getting me a bit confused and if possible I would like some help on how to create the StudentList class. Once I have done this I want to then develop a StudentListTester class to test the StudentList class.
The StudentListTester class is something that I will be able to do without much hassle and it will look something like this below:

Maximum number of items in list? 7
1.add student to list (this needs to include their name and marks for maths, English and science)
2.remove student from list
3.check if list is empty
4.check if list is full
5.display list of students
6.student position? ( explained below)
7.quit

enter choice [1-6]:


6. student position

where you get a specific student from a specified position in the list.

e.g.

list:

chris
sam
tim
gary
dave

pick student : 3
tim.
it shows the student in position 3 and his marks for maths English and science


I would greatly appreciate some help in creating the studentlist class as I am not to sure how to do this. The student class I created may be of some help.

Thanks