?
Solved

UML and VB properties

Posted on 2001-08-20
16
Medium Priority
?
488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 200 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

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!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 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