Current Forum: Homework 1 Forum |
Date: Sat Sep 8 2001 4:31 pm |
Author: Venugopal, Ashish R. <arv@andrew.cmu.edu> |
Subject: Re: operators |
|
|
yes, the operator strings are based on which class they are in, so hard coding them makes sense. make sure to think about how you can use an OperatorNode abstract class to write the toString() function. the toString() function is the same for all the operator nodes except for their String representation ie "*" or "/". Consider creating a member variable in OperatorNode to store a String variable that can be set in the constructor of each individual type of Node. |
|