• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Does this class diagram seem reasonable?

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


I'm not especially proficient at UML but this is what I've cobbled together based on a few tutorials I've read. Does it seem reasonable or am I just way out of my depth!

I just want to represent the structure of the key classes in my data layer and business layer.

Also : Does anyone know of a good text editor that lets you do stuff like this? e.g. cut a whole block of text and paste it to the right of another block? (Windows suggestions only please.)
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems reasonable to me. I have not seperated out a business layer yet so I appreciate the ideas. Man - that must have taken sometime to type into this post!
And I am not sure what you are asking. I am using Netbeans as my IDE, and I can block copy from it into posts here. I also use Textpad as a basic text editor, but it can also format (java, XML, C++) and build java code when you give it the JDK. ( can you tell I like freeware!)
[ September 05, 2007: Message edited by: Mark Ebeling ]
 
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you draw that picture? :-) (looks very nice)
I used ArgoUML, but didn't find a reasonable way to convert pictures to text.
 
David A. Scott
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark -

Sorry, perhaps I should have made it clear.

I'm not really asking about class structure I've chosen. I'm too far down the road to change my mind about that!

All I'm really asking is if this is a valid class diagram that might make sense to the examiner. I don't have much(/any!) experience of UML so I don't really know what I'm doing.

I wanted to include class diagrams in my choices.txt which is an approach that some forum users have taken.

John -

How did I do it? The hard way I'm afraid - typing lots of ascii characters into a text editor.
 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Overaall the diagram gives a big picture, but the relations between classes are confusing or not clear (is it aggregation, uni direction association
etc).

Few questions though?
1. Does Data class composed of FileManager & LockManager?
2. From the above diagram, it seems there is inverse package dependency. i.e. Data is dependent on DBServicesImpl? What is the exact relationship between two?

Editor suggestions : UltraEdit (should serve your purpose), Notepad++

Recommendations : StarUML fro any uml modeling
 
John Stone
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
take a look here, perhaps you'll find it usefull:
http://www.jave.de/

(but I think you are doing unnecessary work)
 
David A. Scott
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajah Nagur:

1. Does Data class composed of FileManager & LockManager?



Yes. Data HAS-A FileManager and Data HAS-A LockManager


2. From the above diagram, it seems there is inverse package dependency. i.e. Data is dependent on DBServicesImpl? What is the exact relationship between two?



DBServicesImpl HAS-A Data object. Or, more accurately, it HAS-A object that implements DB. Data has no dependancy on DBServicesImpl.

I thought <>------ represented composition.
 
David A. Scott
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Stone:
(but I think you are doing unnecessary work)



I'm starting to arrive at the same conclusion...
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems like a very reasonable and easy to understand diagram to me. As a matter of fact, it looks like your database server is EXACTLY the same as mine (with a few method names changed here and there). I passed the exam with this design, by the way, so it looks like you're in good shape!
 
David A. Scott
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Timothy Frey:
Seems like a very reasonable and easy to understand diagram to me. As a matter of fact, it looks like your database server is EXACTLY the same as mine (with a few method names changed here and there). I passed the exam with this design, by the way, so it looks like you're in good shape!



That's great! I just wanted the diagram to make sense.

Thanks Timothy.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

Looking at your class diagram, I had one question for you. How can you have the methods getOwnerLength(), getLocationLength() and getNameLength() in DBServices when they are not provided by the DB interface? The one thing the client would still need to know is the owner length so the book method can throw appropriate error message if the owner Id entered by the user is greater than the database length (8). I am not so sure why you would need the other two methods?
Anyways, I was thinking of throwing exception from the updateRecord method in DBAccess if the length was not met.
Any comments?

Thanks!
 
He does not suffer fools gladly. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic