CS 7100 Fall
2023
Prasad
Assignment 3
(NOT GRADED - Plan to complete by: November 22)
Object-Oriented languages frequently
allow overloading of
methods. This feature allows a class
to have multiple methods of the
same name, provided they have
distinct signatures.
A method's
signature is typically the method
name plus the types of its
parameters. Since we do not have
types in our current language, we
might overload based simply on the
method name and number of
parameters. For example, a class
might have two initialize methods, one with no parameters for use
when initialization with
a default field value is desired,
and another with one parameter
for use when a particular field
value is desired.
Extend the Interpreter for OOPL by
modifying the interpreter code in
myOOPLInterp.scm
to allow overloading based on the
number of method parameters. .
What to develop?
Create a well-tested solution in a file named myOverload.rkt.
In order to better grasp the changes you made, comment out the
code you are modifying rather than deleting it. Include test
calls and outcomes in your solution so as to make it clear
that you are exercising the necessary constructs.