Showing posts with label ASTNode design. Show all posts
Showing posts with label ASTNode design. Show all posts

Sunday, May 11, 2014

ASTNode Class Hierarchy

Focusing on the fundamental requirements of the ASTNode class and crossing out the non-vital aspects yielded a class hierarchy that looked very much like the one provided by my mentors. My proposed class hierarchy, Mock-up A, can be found here. It is a near faultless reproduction of the original class hierarchy mock-up, with the only difference being that class ASTSymbol directly extends ASTNode instead of ASTNumber & ASTFunction.

Mock-up B is the original mock-up. In it, ASTSymbol is subsumed by both ASTNumber and ASTFunction. The original mock-up did not specify just what this would entail, so I recapitulated the structure of the diagrams.

A concern I had while constructing these diagrams, is that it was not very clear to me where logical operators, relational operators and trigonometric operators fit into the whole scheme. Will some of these need to have their own classes? Any thoughts?

The yUML code used to construct the charts can be found here.