2008HIRBI15.Eiffel7 - Agendavoordezeles...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Agenda voor deze les Arrays versus (geknoopte) Lijsten Werken met Linked-Lists ABC-Winkel met Linked-Lists Software Productiviteit en Herbruikbaarheid
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 STUDENT STUDENT STUD MENU STUD MENU STUD SYS STUD SYS Bedrijfsklassen Klassen voor INVOER, UITVOER, CONTROLE Systeemopbouw. ..
Background image of page 2
3 class STUDENT creation maken feature naam: STRING nr: INTEGER punten: ARRAY[REAL] feature maken (naam_in: STRING; nr_in: INTEGER) is do naam := clone(naam_in) nr := nr_in create punten.make(1,3) end --maken feature eindcijfer: REAL is do Result := punten.item(1)*0.5 + punten.item(2)*0.3 + punten.item(3)*0.2 end -- eindcijfer end --class STUDENT Klasse STUDENT
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Klasse STUDSYS class STUDSYS creation maken feature studenten_lijst: ARRAY[STUDENT] studenten_menu: STUDMENU feature maken is do create studenten_lijst.make(1,50) create studenten_menu.maken(studenten_lijst) studenten_menu.uitvoeren end --maken end --class STUDSYS
Background image of page 4
5 class STUDMENU creation maken feature my_students:  ARRAY[STUDENT] studenten_aantal: INTEGER feature maken (students_in: ARRAY[STUDENT]) is do my_students := students_in end --maken Koppeling naar “systeem”lijst van studenten Klasse STUDMENU
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 featureuitvoerenis do from toon keuze lees keuze until stop keuze loop verwerk keuze toon keuze lees keuze end - - loop io.putstring("%N EindeStudentenMenuSessie") end - - uitvoeren Klasse STUDMENU feature toon keuzeis do io.putstring("%N Kieseenvandevolgendeopties: ") io.putstring("%N 0{{Stop.") io.putstring("%N 1{{Maak eenstudent aan") io.putstring("%N 2{{Vul examenpuntenin") io.putstring("%N 3{{ Toongemiddelde") io.putstring("%N Geef uwkeuze: ") end - - toon keuze
Background image of page 6
7 feat ure maak student is local niewe student : STUDENT naam in : STRING nr in : INTEGER do io.putstring(" %N Geef de naam van de student : " ) io.readline naam in := clone(io.laststring) io.putstring(" %N Geef het student nummer : " ) io.readint nr in := io.lastint create niewe student.maken(naam in, nr in) student aantal := student aantal + 1 my students.put(niewe student, student aantal) end - - maak student Klasse STUDMENU
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
featurevul puntenis local naam in: STRING student teller, punten teller : INTEGER student gevonden: BOOLEAN do io.putstring("%N Geef denaamvandestudent : ") io.readline naam in:=clone(io.laststring) from student teller :=1 until (student teller >student aantal) or student gevonden loop if my students.item(student
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 30

2008HIRBI15.Eiffel7 - Agendavoordezeles...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online