• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bar Graph GUI of Observable Sorter  RSS feed

 
Christopher Wallace
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. This is my first time posting here so I hope I'm in the right section. I am CS Student who has a professor that loves giving problems with information that she hasn't covered. My current problem is that I must use either a bubble sorter or selection sorter class to sort a list of integers and display each change with a bar graph representing each integer. Also the sorter uses an interface which is observable. She said that we must use the mvc model. I've been researching that and it seems that i have the model(sorter class) and the view(bar graph). I'm not sure what is supposed to be in the controller. Additionally, I'm assuming I have to override repaint when these changes occur,how would I go about that? Any ideas would really be appreciated.
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

you should try one thing at a time, and one thing only. If you try too much you will simply tie yourself in knots. Suggest you start with one of the sorting algorithms, displaying the state of the array after each pass.
I think you are aiming for something like this, but you should leave that till later. And don't override repaint.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!