posted 9 years ago
I'm just messing around and rewriting a program I'd been working on several months ago -- hopefully end up with a slightly more sophisticated physics calculator. I was hoping you guys could provide me with a little insight. Right now I have just the main, gui, and kinematics classes, eventually, I will add the other areas of physics. The program will open with a main menu where the user can select a topic and they can enter the data into JTFs. Now, when I wrote this program the first time I used a lot of accessor methods(for each variable in the class(topic) ) that it just looked messy, so I want to get rid of those and use something else.
Do you have any ideas how I might accomplish this? I had considered using a list, when the user chooses a field to enter (ex: kinematics) it will initiate a list of type Kinematic.
Also, last time I had an issue with determining which calculations to perform based on the information entered. For instance, if the user left more than 2 JTF's blank (2 variables), but only enough data was given to solve for 1.....how can one account for this in there code? Aside from trying to perform each calculation in the class and breaking from any calculation that has more than one variable...I'm not sure what to do.
this is just a rough example to the kinematics class to give you a better picture of what I'm trying to do.