Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hey gang, I am in the process of trying to figure out what is the best way to complete a project i will be working on. Anyway, I am building a calculator that will take in some equation and calculate it.
Parameters:
Must be OO.
Must hold last 20 equations.Design so far:
So far, I am thinking I will use a switch statment in the client to take in a string(the equation) and pass it to my object that will disect it, meaning push it on to a stack, then do the calculation, then return the result to my client for display. Does this sound right so far?Part I am unsure of:
If I want to go back and look at an equation i have already entered, then I am guessing In the client, that each equation entered should at that point instanciate my object and stuff it into a static array? This way, my equation and result will be stored for use later?Anyway, hopefully you can see where my confusion lies. Any help or suggestions will be greatly appreciated. Thanks in advacne.

![]() |
switch from real to prot...
|
Java Programming... or?
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |