Object example with 2 included classes

Back to example directory | Phps formatted source | Ascii source | Formatted source of the included class | Source of the included class

The following functions of the class "Course" are meant for public use:

The reused "Students" class from the student-class.php exemple is not supposed to be used by a programmer/user of this class. makeStudent("nath", "Nathalie Morand"); $staf14->makeStudent("jules", "Gilles Jules"); $staf14->makeStudent("steph", "Stephane Durand"); // Add some scores to Nathalie on by one $staf14->addScore("nath",4); $staf14->addScore("nath",5); $staf14->addScore("nath",3); $staf14->addScore("nath",6); // Add bunches of scores to the others, we use a different method here !! $staf14->addScores("jules",array(2,1,3,5)); $staf14->addScores("steph",array(6,5,5.5,6,7)); // Print the results $staf14->displayScores (); ?>