Results 1 to 2 of 2
- 06-24-2014, 06:12 PM #1Member
- Join Date
- May 2014
- Rep Power
I'm a beginner and I'm Stuck on programming design issue
Someone probably came accross this issue when they started programming but here is the issue
Currently i created a program of mines with a gui that is in its own .java class files.
The gui will interact with 6 separate java class files. I'm stuck on how to design it
that way my main gui file will interact with the other files in a way that is seamless,
What i litterally mean is the the design approach i should take to make this logical
so i can pass data between them easy return data.
What the program currently does.
User gets to check some check boxes of what test the want to run on the system.
Once user selected these check boxes, and I have there input the parameters . They hit a play button.
This play button will then interface and go to the selected java class
files and perform any of the passed action that was selected.
I separated into 6 separate java class files due to the fact that there are different modules that i will be interacting with.
Each module is different.
I started using an if statement to see what was selected for the check box and i kind of got stuck when i also wanted to
add a switch statement in there. The plan was to have it go to the selected class and give it the selected task to run that was checked.
But the main issue in my mind is not being able to instantiate the class in my current
GUI class but in my mind i was wanting to call the class and start at the constructor and flow from there.
I know i'm probably missing something or looking at this from the wrong perspective, maybe someone would
give me hint of what not to do or how to approach this. I would gladly appreciate it.
- 09-27-2014, 02:24 AM #2
Re: I'm a beginner and I'm Stuck on programming design issue
I'm not sure I understand the problem. Is "not being able to instantiate the class" due to the 'rules of engagement' of your assignment or is the instantion failing? Depending upon what your 6 other classes do/require, you might make their methods static so that you can invoke the method(s) on the class instead of on an instance of the class.
Perhaps you could post a clarified description of the problem.
- By clemsontigers in forum New To JavaReplies: 16Last Post: 02-19-2014, 05:16 AM
- By User19832 in forum New To JavaReplies: 2Last Post: 02-11-2014, 02:15 PM
- By judemartin99 in forum New To JavaReplies: 1Last Post: 04-20-2013, 10:16 PM
- By judemartin99 in forum New To JavaReplies: 1Last Post: 04-20-2013, 10:15 PM
- By tabchas in forum New To JavaReplies: 3Last Post: 05-01-2011, 12:33 AM