• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Class diagram and source code.

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

If I am given a class diagram and the necessary source code with no other documentation, how should I go about figuring out what exactly is happening in the code.
The class diagram and the necessary code are only just a part of a much bigger system, so running the code and figuring out what is happening may not be feasible, what else should I do? How should I approach the class diagram? Hope someone can advise.

Thanks.


regards
John
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well you know what the purpose of a class diagram is right? Is the source code for this class diagram? Is the class diagram match the source code fields and methods?
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Paterson wrote:If I am given a class diagram and the necessary source code with no other documentation, how should I go about figuring out what exactly is happening in the code.


Well, first: Are you familiar with the semantics of a class diagram? For example: the symbols for inheritance and implementation?

Second: When you say "necessary source", is that a copy of the complete .java file for the class, or just some code snippets that someone has deemed "necessary"?

But basically, the class diagram helps you to visualise where your class sits structurally in context with other classes and interfaces of the system. The "source" should help you to see how the methods specific to your class have been implemented, and hopefully - if they're named and documented well - what they're designed to do.

HIH

Winston
 
John Paterson
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the replies. Yes I am aware what a class diagram is about. The class diagram I have is for the specific classes I am going to deal with. The source code is for the entire
system.

regards
John
reply
    Bookmark Topic Watch Topic
  • New Topic