Solved

UML and VB properties

Posted on 2001-08-20
16
476 Views
Last Modified: 2013-11-26
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
Comment
Question by:lynx2sw1
  • 7
  • 6
  • 3
16 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6407846
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
 
LVL 1

Author Comment

by:lynx2sw1
ID: 6407894
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6408006
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:rskathait
ID: 6408743
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
 
LVL 1

Expert Comment

by:rskathait
ID: 6408825
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
 
LVL 1

Expert Comment

by:rskathait
ID: 6409006
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
 
LVL 1

Author Comment

by:lynx2sw1
ID: 6410114
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
 
LVL 1

Expert Comment

by:rskathait
ID: 6412138
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
 
LVL 1

Author Comment

by:lynx2sw1
ID: 6413778
under UML CLass, under the operations tab, I see only columns for Operation, Return Type,Visibility,Polymorph, and scope.

0
 
LVL 1

Accepted Solution

by:
rskathait earned 100 total points
ID: 6416230
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
 
LVL 1

Author Comment

by:lynx2sw1
ID: 6417775
i said i was new to it why put me down?
0
 
LVL 1

Author Comment

by:lynx2sw1
ID: 6417807
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6417909
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
 
LVL 1

Author Comment

by:lynx2sw1
ID: 6417959
I dont think I have ever told anyone hey listen for a change it will help your retarded learning curve.
0
 
LVL 1

Expert Comment

by:rskathait
ID: 6420704
> 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
 
LVL 1

Expert Comment

by:rskathait
ID: 6420714
>> 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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help me. 3 69
update joined tables 2 62
Problem to line 23 73
Add New Database Table in database file using delphi 3 27
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question