Skip to content

Instantly share code, notes, and snippets.

@nicopaez
Created March 13, 2012 23:54
Show Gist options
  • Save nicopaez/2032774 to your computer and use it in GitHub Desktop.
Save nicopaez/2032774 to your computer and use it in GitHub Desktop.
Trabajo práctico N° 0, Tema B, Primer Cuatrimestre 2012, Algoritmos y Programación 3, FIUBA
|libreta materia1 materia2|
materia1 := Materia new.
materia1 calificacion: 9.
(materia1 estaAprobada) ifTrue: [ Transcript show: 'Prueba 1 OK'; cr.].
materia2 := Materia new.
materia2 calificacion: 1.
(materia2 estaAprobada) ifFalse: [ Transcript show: 'Prueba 2 OK'; cr.].
libreta := LibretaUniversitaria new.
libreta registrarMateria: materia1.
libreta registrarMateria: materia2.
(libreta cantidadDeMateriasAprobadas = 1) ifTrue: [ Transcript show: 'Prueba 3 OK'; cr.].
(libreta promedioDeNotas = 5) ifTrue: [ Transcript show: 'Prueba 4 OK'; cr.].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment