From 47e9b3ce066c79c800c0b1fecd7e4079c71ad3dd Mon Sep 17 00:00:00 2001 From: Moise Dete-Kpinssounon Date: Tue, 28 Jun 2022 16:40:15 -0400 Subject: [PATCH] fixed issue #206 in the pretext version --- pretext/Inheritance/04-ReuseThroughComposition.ptx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pretext/Inheritance/04-ReuseThroughComposition.ptx b/pretext/Inheritance/04-ReuseThroughComposition.ptx index c06963cc3..281b88c5a 100644 --- a/pretext/Inheritance/04-ReuseThroughComposition.ptx +++ b/pretext/Inheritance/04-ReuseThroughComposition.ptx @@ -38,7 +38,7 @@ print(p.distanceFromOrigin())

The first thing to notice about this version of LabeledPoint - does not inherit from Point. Instead, its constructor + is that it does not inherit from Point. Instead, its constructor instantiates a Point and stores a reference to it in its point instance variable so that it can be used by the other methods.

Next, notice how the distanceFromOrigin() method reuses the code in