jQuery in Action, 3rd edition
The moose likes OO, Patterns, UML and Refactoring and the fly likes Help required for identifying classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Help required for identifying classes" Watch "Help required for identifying classes" New topic

Help required for identifying classes

Asha Ganapathy

Joined: May 26, 2008
Posts: 6
Hi All,

I have a question paper, where given an application, classes have to be identified.

The following is a description of an application that can be used to maintain heterogenous documents that may be related in some way.
For example, a researcher may like to keep track of all the various documents collected while researching a particular topic. The documents are collected from various sources, and are in various formats (word documents, web pages, pdf, plain text, excel documents, images and so on).
The documents can be heirarchially related. There can be several aspects of the topic . For example, the user collects several articles under the heading �programmig languages�. After a while , the user finds articles which relate either to the principles, or to the study of existing languages. The user now creates sub headings � �principles� and �case studies� to store these documents. Then more headings appear � �syntax�, �front end� �implementation� and �back end� under �principles�;� procedural�, and �object oriented� under �case studies� and so on).
The user can create a new logical �folder� for a new topic, by setting the title of the topic. All documents collected under this heading will be bunched under this heading. As and when the user identifies subtopics, he/she creates new subheadings and stores the documents relating to it, and so on. Of course, the user can view, modify and save any existing �folder�.
The user uses the application to navigate through the compound document and view a listing of documents, and then the document he/she chooses. Navigation is through the headings. The user is allowed to search for words through the entire document, starting at any heading. Similarly, the user can make some changes like change of font, format, background to all the documents starting from some heading. The search yields a list of individual documents, which the user can view one by one.
The documents are in various formats and need the correct application to open, display, search them . (web browser and other word processing applications).Assume that these applications are available to the developer of the document manager application in the form of component objects with well defined, but varied interfaces.
The document manager application uses these other application to display the documents. Of course, the co-operation of these applications is needed in searching the entire document, or to make other changes.

1) Identify the classes in the problem. Give the design classes

Please anyone let me know how should go about solving this problem.
Should i first write a use-case then try to identify the classes using the use-case?

Thanks a lot,

Combating with SCJP!
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Should i first write a use-case then try to identify the classes using the use-case?

Writing the Use cases might help you learn more about the actual requirements and might help you formulate a business/domain object model for handling the requirements. The key activity is to first understand the business/domain requirements. One can rarely create a good design if they don't understand "what" is needed. Not "how" it can be done, it is about learning "what" needs to be done.

Once you understand "what" needs to happen, then you can work on a few "hows". When you have a few "hows", then pick one and implement it.

Good luck!
Thomas Jacobson

Joined: Oct 01, 2008
Posts: 1
I agree with James, if you would do proper sytem development, you would start with finding the use cases and actors. You would then document each use case and do realization of each use case. Doing that you would create one/more sequence diagrams and then one View of Participating Classes diagram (VOPC-diagram) for each use case.

If thats not the case, you can go ahead and find the design classes by
  • Underlining the nouns
  • Some nouns are attributes, some will be nothing in the design model but several will be candidate classes.

  • How are the classes related? Best way would be to create a couple of sequence diagrams to display how the objects are communicating, based on that you would find relationships and even the responsibilties of the different classes...

    But as James wrote, find the actors and use cases first...

    Complete and Meaningful - <a href="http://www.usecase.com" target="_blank" rel="nofollow">www.usecase.com</a>
    I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
    subject: Help required for identifying classes
    jQuery in Action, 3rd edition