{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSC-113-Tutorial.1(2) - and arStudentName the content of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
KSU / CCIS / CS DEPARTMENT CSC-113, SPRING 2010 TUTORIAL 1 PRIMITIVE DATA ARRAYS Create class StudentSet including the following: - arStudentId : array of double that represent student Id numbers. Can hold 100 elements. - arStudentName : array of String that represent student names. Can hold 100 elements. - No-argument constructor initializes arStudentId and arStudentName with the default values 0 and “NONAME”. - Constructor StudentSet(double[] studentIds, String[] studentNames) that copies in arStudentId
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: and arStudentName the content of the arrays given as parameters. We suppose the size of studentIds and studentNames < 100 . -Method getStudentName(double id) that looks for the existence of a given student Id and returns his name. -Method addStudent(double id, String name) that adds a student’s data at the end of the arrays. -Method deleteStudent(double id) that deletes the given Id number and the corresponding name. Deletion will consist in setting to default values....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online