Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 10th, 2008, 10:36 PM   #1
Grich
Hobbyist Programmer
 
Grich's Avatar
 
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 199
Rep Power: 2 Grich is on a distinguished road
Question about UML diagrams

Okay, for college one of the teachers wants us to hand in a UML diagram with our projects, which is fine, I've been doing them for a while, I'm used to them.
Then someone says that I have been doing them wrong.
Apparently, some people add in the operations section of the class the constructors and destructors as well like this example:
--------------------------
|     Cat                |
--------------------------
| -Name : String         |
--------------------------
| +Cat(String)           |     <-----This being the constructor
| +getName : String      |
--------------------------

Is this correct? Because I have been doing it without the constructors
__________________
SYNTAX ERROR ...
Grich is offline   Reply With Quote
Old Jun 11th, 2008, 12:32 AM   #2
InfiNate
Newbie
 
Join Date: Nov 2007
Location: Waterloo, ON
Posts: 20
Rep Power: 0 InfiNate is on a distinguished road
Re: Question about UML diagrams

When I took my software specification course we were required to include all constructors except for the default constructor. This makes sense since you want to let your programmers know what kind of constructors they will need to create.

For example, say the Cat class had other optional members like age, weight, color, and there were a bunch of Constructors: Cat(string, int, int, string), Cat( string, int, int ), etc... you should include all of these in your UML to indicate they need to be written by the programmers.

Hopefully that makes sense.
InfiNate is offline   Reply With Quote
Old Jun 11th, 2008, 12:38 AM   #3
Grich
Hobbyist Programmer
 
Grich's Avatar
 
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 199
Rep Power: 2 Grich is on a distinguished road
Re: Question about UML diagrams

Yep, that made sense. Thankyou InfiNate.
__________________
SYNTAX ERROR ...
Grich is offline   Reply With Quote
Old Jun 11th, 2008, 12:43 AM   #4
InfiNate
Newbie
 
Join Date: Nov 2007
Location: Waterloo, ON
Posts: 20
Rep Power: 0 InfiNate is on a distinguished road
Re: Question about UML diagrams

Glad to help. First time I have actually used anything I learned in that class!!
InfiNate is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ template and namespace question Soulstorm C++ 3 Jan 22nd, 2006 2:46 PM
How to post a question nnxion C++ 10 Jun 3rd, 2005 11:53 AM
How to post a question nnxion C++ 0 Jun 3rd, 2005 8:55 AM
How to post a question nnxion C 0 Jun 3rd, 2005 8:55 AM
Question Marks dmorales Other Web Development Languages 3 May 19th, 2005 11:12 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC