Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
teaching:cc4101:tareas:2025-1:tarea3 [2025/06/19 21:07] – [Parte 3 (extra): Campos de Clase (1 pt de Bonus)] dibanez | teaching:cc4101:tareas:2025-1:tarea3 [2025/07/09 20:04] (current) – [Objetos (1.5 pts)] dibanez | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Tarea 3 (Entrega: | + | ====== Tarea 3 (Entrega: |
Esta tarea se distribuye con un archivo zip ({{ : | Esta tarea se distribuye con un archivo zip ({{ : | ||
Line 204: | Line 204: | ||
{def init {x y} {begin {set x x} | {def init {x y} {begin {set x x} | ||
{set y y}}}}}} | {set y y}}}}}} | ||
- | {init A}}) | + | {new A}}) |
; Retorna una instancia donde x e y no están inicializados. | ; Retorna una instancia donde x e y no están inicializados. | ||
</ | </ | ||
Line 329: | Line 329: | ||
| | ||
{set y {+ 1 {get self y}}}}}}} | {set y {+ 1 {get self y}}}}}}} | ||
- | {o1 {init A 5}} | + | {o1 {new A 5}} |
- | {o2 {init A 10}} | + | {o2 {new A 10}} |
- | {o3 {init A 0}}} | + | {o3 {new A 0}}} |
{get A y}}) | {get A y}}) | ||
3 | 3 |