943,651 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 361
  • Java RSS
Mar 23rd, 2009
0

problem with implementing MVC

Expand Post »
I have recently encoutered an error that I have failed to figure out while trying to implement something in MVC. I have used a similar code on another program which seems to work but I cant figure out why this one is not working.
I get the error code "cannot find symbol class myGameModel". this error is repeated for the controller, panel and view.
I will post the controller and model only. Hope to get some advice. thanks.
java Syntax (Toggle Plain Text)
  1. //CONTROLLER
  2. package Game;
  3. public class myGameController{
  4. private myGameModel model;
  5. private myGameView view;
  6.  
  7. public myGameController(myGameModel model){
  8.  
  9. this.model=model;
  10. }
  11.  
  12. public void set(myGameView view){
  13.  
  14. this.view=view;
  15. }
  16.  
  17. public void newGame(myGameModel model){
  18.  
  19. model.newGame();
  20. }
  21.  
  22. }
  23.  
  24. //MODEL
  25. package Game;
  26. import java.util.Observable;
  27. import java.*;
  28.  
  29. public class myGameModel extends Observable {
  30. private myGameController controller;
  31. private boolean turn;
  32. private int[][] gameBoard=new int[3][3];;
  33.  
  34. public void newGame()
  35. {
  36. //some code
  37. }
  38. }
PS. the above code is just a structure but when I compile the individual files, It cant seem to find other classes
Similar Threads
Reputation Points: 19
Solved Threads: 20
Posting Whiz in Training
joshmo is offline Offline
280 posts
since Oct 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: code required
Next Thread in Java Forum Timeline: trouble with method call





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC