![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 199
Rep Power: 2
![]() |
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 ... |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Nov 2007
Location: Waterloo, ON
Posts: 20
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 199
Rep Power: 2
![]() |
Re: Question about UML diagrams
Yep, that made sense. Thankyou InfiNate.
![]()
__________________
SYNTAX ERROR ... |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Nov 2007
Location: Waterloo, ON
Posts: 20
Rep Power: 0
![]() |
Re: Question about UML diagrams
Glad to help. First time I have actually used anything I learned in that class!!
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |