Object Orientation in VB.NET
- From: "Persophen" <yerboln@xxxxxxxxx>
- Date: 28 Mar 2006 09:30:11 -0800
I have got a program where I should extensively implement
object-oriented features of the vb.net. I have got a class tenant and a
class room, both belong to some dormitory. In that dormitory class i
have 2 array lists to store objects of class tenant and room
respectively. In class tenant I created association with the class
room, so I may see in which room every tenant lives. However I did not
create association in the room class in order to avoid data
duplication.
Instead if I want to lookup which tenant lives in some particular room,
I first get the room number from the rooms array list and then I lookup
the same room no in the tents list and retrieve the corresponding
tenant's name.
I am not sure whether this approach is fine, anyway it provides me info
I need. But I am not sure whether it is object oriented enough? Should
I create an association to tenant class in the room class?
Someone told me that class should be a complete entity and hold all the
info it is supposed to hold. I would like to get your opinion in that.
.
- Follow-Ups:
- Re: Object Orientation in VB.NET
- From: H. S. Lahman
- Re: Object Orientation in VB.NET
- From: andrew queisser
- Re: Object Orientation in VB.NET
- Prev by Date: Re: UML class diagrams: hiding the attribute list
- Next by Date: Re: UML class diagrams: hiding the attribute list
- Previous by thread: UML class diagrams: hiding the attribute list
- Next by thread: Re: Object Orientation in VB.NET
- Index(es):