Question based on MVC - require responses ASAP please
Hi there, I already have a general understanding of what the MVC structure entails, however one thing that confuses me is how each class is stored - more specifically the use of packages within a netbeans project for M-V-C. (Where classes for each are placed within their respective packages/folders).
As of now I have a deadline of tomorrow night for a group project and whilst we believe the classes interact in a MVC structure, we have all classes within one package/folder. I've spoken to other groups who have seperated them into different packages, but unforunately in our attempts to restructure our code we have run into errors (which mainly involves a few minor adjustments to one of the controller classes with Listeners).
My university doesn't specify the need to have differing packages however marks are awarded for "good Model-View structure".
Whilst I do understand that going directly to the source (lecturers) would provide a definitive answer this isn't possible at the moment so in the meantime I would be grateful for your opinions as I'm stressing over this and need to be awake in a few hours.
Re: Question based on MVC - require responses ASAP please
The package isn't so important, so long as the model code is in its own class and the view code in its own class. The observer and listener classes can be private inner classes of the view class, but if they get too big they should be moved to their own seperate class. I think putting the observers and listeners in their own packages would be counter productive, because you would have to work between two or more packages when working on the view.