270 likes | 734 Views
(Continued). P[ i ]=new Student();. Constructor Section (Student pr[]). Main: Section sec= new Section(list);. st. s. st. s. st. s. st. s. pr. list. 0. 1. 2. 3. 4. 5. sec. 4. 0. Add an object. Main: sec . addStudent (std). 0. 1. 2. 3. 4. 5. sec. 4. 5. p1. std.
E N D
Constructor Section (Student pr[]) Main: Section sec= new Section(list); st s st s st s st s pr list 0 1 2 3 4 5 sec 4 0
Add an object Main: sec .addStudent(std) 0 1 2 3 4 5 sec 4 5 p1 std
Find student by 1 parameter sec .oldestStudent() 0 1 2 3 4 5 sec old
Simple object deletion Sec . delete1Student(std); pr std 0 1 2 3 4 5 sec
Simple object deletion Sec . delete1Student(std); X=2 pr std 0 1 2 3 4 5 sec 4
object deletion with replacement Sec . delete2Student(std); pr std 0 1 2 3 4 5 sec
object deletion with replacement Sec . delete2Student(std); pr std 0 1 2 3 4 5 sec 4