• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

UML and VB properties

1. How should I represent a VB property in a UML static class diagram?  I am learning UML (and VB for that matter) and am now doing a UML diagram using MS Visio.

As I see it I can call a property an attribute or an operation or ...

2. Shopuld a class implementing a base class be depicted as implementing an interface, or inheriting from a base class?  VISO does not seem to cheat and let me have data
in an interface.  But VB seems to only offer implementation of a class for inheritance.
0
lynx2sw1
Asked:
lynx2sw1
  • 7
  • 6
  • 3
1 Solution
 
Anthony PerkinsCommented:
1.  There are subtle differences, but broadly speaking property = attribute and an operation = method.  This is the way code is generated.

2.  Visio is just a template and will therefore will not be as thorough in the implementation. Visual Modeler as found in the VB Enterprise version is somewhat better, but is still a severely cut down version of Rational Rose.
0
 
lynx2sw1Author Commented:
so referencing item (2) i should use the interface stereotype?  and negelct to show the data mebers of the interface?  or should i just show an inheritence.  there is a copy of rational rose lying around the office.  but im somewhat intimidated to try it.
0
 
Anthony PerkinsCommented:
I am sorry you are out of my league:  I don't know the answer.

In any case I would install Rational Rose as this is by far a better implementation than what you can get with Visio and Visual Modeler.

Anthony
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
rskathaitCommented:
Hi,

2. I think you should use interface or base class. No problem. And if Visio is giving the data in implemenation class. Then make properties as private.

1. You are right property is an attribute, but you have to put the get, set or let methods (operator) for these.


rsk

0
 
rskathaitCommented:
Hi,

I will put some samples from Rose 98:

1. 'Name' Property in Person Class

<<Class Module>>Person
**********************
Attributes
----------
strName : String
Operations
----------
<<Let>>Name(str : String)
<<Get>>Name() : String

<<Let>> is Stereotype in Rose
strName if it is a variable that is used as property.

2. For inheritance use simple classes and use it. No problem. If you want to depict interface inheritance (supported by VB), make variable private.

CHeers,



0
 
rskathaitCommented:
Continue from last comment

In Visio

instead of <<Let>> Name(str : String)

use

<<accessor>> let_Name(String)

rest is also applicable for Visio.

rsk
0
 
lynx2sw1Author Commented:
how do i add the <<accessor>>.  I am looking at Visio, at the operations menu after i double click the class of interest.  do i just type in the <<accessor>> in the name of the operation?  sorry i am utterly new at this.
0
 
rskathaitCommented:
When you add an operation, there is a stereotype field, select 'accessor'  for it. (Visio 2000). And type the 'let_Name' for name field (as in my example above).

I will suggest you that better create a project in VB6 and then revesrse engineer it. You can easily see how Visio represents all VB concepts. I Think this is the easiest way to learn VISIO and VB.


Good Luck,
rsk



0
 
lynx2sw1Author Commented:
under UML CLass, under the operations tab, I see only columns for Operation, Return Type,Visibility,Polymorph, and scope.

0
 
rskathaitCommented:
Click new on this tab and then click properties you will see a new tab showing stereotype field also. I am using MS Visio 2000 SR1 (6.0.2072).

I think you are new to Visio UML business. Try my suggestion it will improve your learning curve a lot.

enjoy,
0
 
lynx2sw1Author Commented:
i said i was new to it why put me down?
0
 
lynx2sw1Author Commented:
Thanks for the help.  Its kind of hard for me to be slapped in the face like that and then provide a fair grade.
0
 
Anthony PerkinsCommented:
lynx2sw1,

I don't believe there was any put down intended.  You got the answers to the questions you needed and much more.  That is what you should base your grading on.

I would not expect any additional help from rskathait.

Anthony
0
 
lynx2sw1Author Commented:
I dont think I have ever told anyone hey listen for a change it will help your retarded learning curve.
0
 
rskathaitCommented:
> I think you are new to Visio UML business. Try my suggestion it will improve your learning curve a lot.
RSK -- I do not think this may let down anybody, who is seriously willing to learn beautiful art like UML. It was a friendly suggestion. I am repeating again just try once my suggestion, and see the difference. I learned a lot of thing in my life with doing reverse engineering (or after thoughts in general life.)
And I will say frankly I was insisting this way, because I opened Visio 2000 first time in my life to help you (or EE community). I always work with Rational Rose 98 or 2000.

>> i said i was new to it why put me down?
RSK -- It was not intended so. I do not believe I can hurt anybody like this. I am really SORRY.

>>> Thanks for the help.  Its kind of hard for me to be slapped in the face like that and then provide a
fair grade.
RSK -- Do not worry. I do not work for grades. I visit EE for getting help most of the time. EE is very good knowledge base. There are very few resources like this. Thanks for grade, I accept it.

>> I would not expect any additional help from rskathait.
RSK -- Don't worry, I will help if I can and I have time.

Thanks for grading,

Good luck and keep the EE going.
rsKathait
0
 
rskathaitCommented:
>> retarded learning curve
RSK -- I never told so or I never mean so. But please agree that there is a possibility of learning always.

Do you know Hindu mythology, I will quote one Sanskrit (Ancient Indian language - One of the richest language in world) shloka (verse)
"Guruh Devo Bhav" means "Teacher is the God."

Ha... Ha... Just joking. This time do not take this on your face or heart, just let it pass.


Cheers,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now