OK thanks Norm, thought there might be a quicker way like getPixels when it's being drawn. Will use your suggestion though.
Type: Posts; User: Diplo
OK thanks Norm, thought there might be a quicker way like getPixels when it's being drawn. Will use your suggestion though.
The program is for a shortest path algorithm. The user can draw the nodes (circles) and connect them with vertexs (lines), then calculate the shortest path between them. If they click somewhere on...
In my program I want to first draw two circles then be able to connect them by drawing a line between them. If the line is in each of the circles, the line will draw between them. If not, the line...
If you wanted to use Arrays you could always write you're own Contains method. Just a simple boolean method that loops through the list and returns true if it's found would do. Benefit of arrays is...
**EDIT. Oops didn't see the 2nd page. Here's my two cents anyway ;)
There's a few problems with your code, but if this is only a basic project, why not change:
System.out.println("True");
...
Ok outlined the rough details of the error. Was a pretty stupid error on my part though so not sure how many it will help! Thanks for your help anyway.
Sorry, you're right, the error was in another part of the code.
**Never mind, there was an error somewhere else in the program.**
If anyone is interested though:
Original problem was a ClassCastException error I was getting. Relevant code is:
//Menu...
OK I think things are a bit clearer now. So instead of having Patients as seperate class I should have it as an inner class? And declare the patient array inside the hospital class with
public...
Thanks for the reply copeg. Can you elaborate on your answer though? I've read it a few times but still quite sure what you mean.
What kind of information would this data model have in it?
...
Hi there,
I've got a bit of free time at the minute and am teaching myself to program. Making steady progress but have trouble with a practice project I'm trying to do. Its a demo hospital...