Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
L
LINFO2335 - Assignement Project 2
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Nicolas Verbois
LINFO2335 - Assignement Project 2
Validations
8e4dd9f2
Valider
8e4dd9f2
rédigé
3 years ago
par
Nicolas Verbois
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Replace step_4.rkt
parent
9690a535
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
step_4.rkt
+24
-49
24 ajouts, 49 suppressions
step_4.rkt
avec
24 ajouts
et
49 suppressions
step_4.rkt
+
24
−
49
Voir le fichier @
8e4dd9f2
...
...
@@ -19,16 +19,16 @@
))
(
define
(
getcolor
)
color
)
(
define
(
gettype
)
'color-point
)
(
define
(
getinfo
)
(
append
(
super
'info
)
(
list
(
self
'
get
-
color
))))
(
define
(
getinfo
)
(
append
(
send
super
'info
)
(
list
(
getcolor
))))
(
define
(
add
cp
)
(
color-point
(
+
(
super
'getx
)
(
cp
'getx
))
(
+
(
super
'gety
)
(
cp
'gety
))
(
getcolor
)))
(
define
(
self
m
)
(
cond
((
eq?
m
'get-color
)
(
getcolor
)
)
((
eq?
m
'info
)
(
getinfo
)
)
((
eq?
m
'type
)
(
gettype
)
)
(
cond
((
eq?
m
'get-color
)
getcolor
)
((
eq?
m
'info
)
getinfo
)
((
eq?
m
'type
)
gettype
)
((
eq?
m
'add
)
add
)
((
eq?
m
'set-self!
)
set-self!
)
(
else
(
send
super
m
))))
(
else
(
super
m
))))
self
)
;POINT
...
...
@@ -43,28 +43,28 @@
(
define
(
getx
)
x
)
(
define
(
gety
)
y
)
(
define
(
gettype
)
'point
)
(
define
(
getinfo
)(
list
(
self_ref
'type
)
(
self
'
getx
)
(
self
'
gety
)))
(
define
(
getinfo
)(
list
(
send
self_ref
'type
)
(
getx
)
(
gety
)))
(
define
(
setx
value
)(
set!
x
value
))
(
define
(
sety
value
)(
set!
y
value
))
(
define
(
add
p
)
(
point
(
+
(
getx
)
(
p
'getx
))
(
+
(
gety
)
(
p
'gety
))))
(
point
(
+
(
getx
)
(
send
p
'getx
))
(
+
(
gety
)
(
send
p
'gety
))))
(
define
(
self
m
)
(
cond
((
eq?
m
'getx
)
(
getx
)
)
((
eq?
m
'gety
)
(
gety
)
)
((
eq?
m
'type
)
(
gettype
)
)
((
eq?
m
'info
)
(
getinfo
)
)
(
cond
((
eq?
m
'getx
)
getx
)
((
eq?
m
'gety
)
gety
)
((
eq?
m
'type
)
gettype
)
((
eq?
m
'info
)
getinfo
)
((
eq?
m
'setx!
)
setx
)
((
eq?
m
'sety!
)
sety
)
((
eq?
m
'add
)
add
)
((
eq?
m
'child
)
(
send
self
'getcolor
))
((
eq?
m
'set-self!
)
set-self!
)
(
else
(
send
super
m
))))
(
else
(
super
m
))))
self
)
(
define
(
send
p
m
.
args
)
(
if
(
procedure?
p
)
(
cond
((
null?
args
)
(
p
m
))
((
null?
args
)
(
(
p
m
))
)
(
else
((
p
m
)
(
car
args
))
...
...
@@ -74,43 +74,18 @@
(
define
(
new
object-class
.
class-args
)
(
cond
((
eq?
object-class
color-point
)
(
if
(
eq?
(
length
class-args
)
3
)
(
let
((
temp
(
color-point
(
car
class-args
)
(
cadr
class-args
)
(
caddr
class-args
))))
; apply for arguments
(
begin
(
send
temp
'set-self!
temp
)
temp
)
)
(
display
"SON PERE"
)
))
((
eq?
object-class
point
)
(
if
(
eq?
(
length
class-args
)
2
)
(
let
((
temp
(
point
(
car
class-args
)
(
cadr
class-args
))))
; apply for arguments
(
begin
(
send
temp
'set-self!
temp
)
temp
)
)
(
display
"SON PERE"
)
))
((
eq?
object-class
object
)
(
if
(
eq?
(
length
class-args
)
0
)
(
let
((
temp
(
object
)))
; apply for arguments
(
begin
(
send
temp
'set-self!
temp
)
temp
)
)
(
display
"SON PERE"
)
))
)
(
let
((
temp
(
apply
object-class
class-args
)))
(
begin
(
send
temp
'set-self!
temp
)
temp
)
)
)
(
eq?
color-point
point
)
(
define
cp
(
new
color-point
5
6
'red
)
)
(
cp
'type
)
; c o l o r - p o i n t
(
cp
'getx
)
; 5
(
cp
'gety
)
; 6
(
cp
'get-color
)
; red
(
cp
'info
)
; ( c o l o r - p o i n t 5 6 red )
(
send
cp
'type
)
; c o l o r - p o i n t
(
send
cp
'getx
)
; 5
(
send
cp
'gety
)
; 6
(
send
cp
'get-color
)
; red
(
send
cp
'info
)
; ( c o l o r - p o i n t 5 6 red )
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter