Solved

UML and VB properties

Posted on 2001-08-20
16
466 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Expert Comment

by:rskathait
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:lynx2sw1
Comment Utility
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
Comment Utility
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
Comment Utility
i said i was new to it why put me down?
0
 
LVL 1

Author Comment

by:lynx2sw1
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
> 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
Comment Utility
>> 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now