Java - Developers assistance please

ArchieChoke

New member
Hi java Dev's

If possible could someone give me advise around java.
I'm a novice so bar with me here.

Right so the assingment was to create an ATM using a simple consol, cool that was no problem and it worked very well. All the methods were placed in the same class as the main method.

Was so chuffed. Till I got to Question 3, now use the code from Question 2 (atm).
Then I literally had a melt down.

So to try and repair the damage done, I started a new class and began the process of creating all the methods within there and cohesively couple methods together for if the consol isActive or isJFrame and handle the output using the built bool functions to check if they are active.

Now here comes the problem, plugging the GUI straight into main do while loop. I keep getting into infinite loops.

Is there any advise you could give any key concepts I could be missing that can reduce the work load on this.

While sleeping I was thinking of forcing the lecturer to run each source file individually. I.e. consol will be run from, JavaConsol.java source code then the GUI will be run from JFrame. - would this be suitable?

Using netbeans.
Herewith source:
https://www.dropbox.com/s/9y9w4t6yhcqq80q/JP_ATM_GUI_Console.zip?dl=0
 
[MENTION=6134]ArchieChoke[/MENTION]

I can not access dropbox from work.

you know you can access a public methods from another class?

something like

Example f = new Example ();
f.mymethod();

and it sounds like your main should create new instances of all the depended classes. not do the actual work.
 
[MENTION=6134]ArchieChoke[/MENTION]

I can not access dropbox from work.

you know you can access a public methods from another class?

something like

Example f = new Example ();
f.mymethod();

and it sounds like your main should create new instances of all the depended classes. not do the actual work.

Hi thanks for the response.

Yeah being doing whole lot of public static , public void.
So that part is alright.


Our senior dev had a quick look and told me the problem is I am trying to do a whole bunch of if elses in one function to cater for if the JFrame is active or not. I should rather seperate the function into one for consol and one for GUI.
 
Back
Top