2 Replies - 3986 Views - Last Post: 08 June 2012 - 02:53 PM

#1 xCmac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 16-April 12

Confused about how MVC works?

Posted 08 June 2012 - 01:12 PM

I understand M(model) V(view) C(controller): so the user gets an interface(view) that shows certain options/data and uses the Controller to both modify the Model and update the View.

But from a programming stand point I am so lost... how is this put together? My teacher had us do textual analysis and some UML modeling but im still rather lost when i try to connect the dots. I just cant grasp the concept of how I tie this in together. I dont need any help with programming just the structure and set up!

So she gave us this text that basically describes whats supposed to happen
The class Driver (VIEW), class List (MODEL), and class Tests (CONTROLLER) such that an object of this class can store a studentís first name, last name, five test scores, average tests score, and grade.  Add constructors and methods to manipulate data stored in an object. Among other things, your classes must contain methods to calculate test averages, return test averages, calculate grades, return grades, and modify individual test scores. The method toString must return test data (including studentís name, five test scores, average, and grade) as a string plus the class average. 


I feel so lost when I try to implement this though, I made 3 classes, Driver(main), List, and Tests.

Im just not sure on what class to give what method. The only thing clear to me so far is that class List will hold the data!

I've looked up and in my book online and have seen many pictorial examples of MVC. But i just cant put it together in coding :(
can anyone dumb this down for me??

thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: Confused about how MVC works?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10376
  • View blog
  • Posts: 38,415
  • Joined: 27-December 08

Re: Confused about how MVC works?

Posted 08 June 2012 - 01:38 PM

Moved to Software Development.

Check out this tutorial on MVC by GregBrannon.
Was This Post Helpful? 0
  • +
  • -

#3 xCmac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 16-April 12

Re: Confused about how MVC works?

Posted 08 June 2012 - 02:53 PM

Looks like one of the better tutorials I've seen so far.. I'll definitely take a closer look when I get home !
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1