views:

54

answers:

2

My professor asked us to generate UML for next homework. We are using Visual studio 2010 for c++ programming. I tried to work on it but I could not figure out, I went to Architecture-> Windows -> UML Model Explorer but don't understand where to go next. Is UML generator creates UML automatically or it will just give bunch of boxes to fill all the information about class and objects (Manually)?

A: 

Your question confuses me, particularly when you mention using Visual Basic 2010 for C++. I assume you meant Visual Studio 2010.

As to doing UML... are you using Visual Studio Ultimate? If so, you can create some UML diagrams in Visual Studio, but there is no support for reverse engineering UML from existing code; you'll have to generate the UML diagrams by hand.

What you should do is generate the UML before you code, then code against the model you built. But that's something you'll hopefully learn over time.

That said... there's a feature of all versions of Visual Studio called a "Class Diagram" which is tightly coupled to and propagates data to and from the code -- modifying the diagram will modify the code, and vice versa. It should be stressed that a VS Class Diagram is not completely UML, although it looks similar. Additionally, Class Diagram for C++ doesn't work for me, however, so I don't know how much mileage you'll get from it if you're using C++/CLI rather than VB.NET. If you're using native C++ it will not work, period.

Ultimately, your best bet is to do the UML by hand. If you have the UML tools with Visual Studio, use them since they're available, but they're not the best UML tool on the market by a long shot. For that, I recommend Visual Paradigm for UML, which has a free version that adds watermarks to the diagrams and also has a Visual Studio plugin available.

Randolpho
Sorry for making it confusing and thanks for the suggestions, I will consider that.
Cool
A: 

Download StarUML. It's one of the better ones out there IMHO. There's also DIA, ArgoUML, and Eclipse (with some plugins). The latter two generally force you to do it exactly correct, which almost nobody actually knows how to do (including myself). The former two let you just draw the damn diagram.

Noah Roberts