Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Java] Class Hierarchy Design - Serious Help Needed!
#3
Its a basic parsing problem. What you need is a tokenizer to break the string into "tokens", a parser to parse the string for correct syntax and objects creation. The class hierachy should be something like this:

basic
class Char
class Int
class Float

expressions
class Add
class Divide
class Bracket

As you can see, Add and Divide take in 2 arguments, Bracket takes 1, etc. The rest you should learn for yourself.
Reply


Messages In This Thread
[Java] Class Hierarchy Design - Serious Help Needed! - by GummyBear - 2009-02-02, 07:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)