Library tutorials & articles
Introduction to Class Programming
Introduction
In application program development, one of the most important considerations is the program's ability to accurately represent our perception of the real world. This requires the program to incorporate a realistic data model. Such a program is certainly easier to understand than one that performs its task without using a data model.
In order to develop a data model, we begin with the contention that the real world consists of entities and relationship.
An entity is defined as a live being, object or abstraction that can be described in terms of certain characteristic, and is similar to, but distinct from, entities of the same type.
An entity set is a collection of entities of the same type. For example, the books in your personal library make up an entity set; this book that you are reading now is a member of the entity set. You are a student, and therefore, you are member of the entity students of your college.
Each member of an entity set is different from the other member of the same set. The difference stem from their individual characteristic, called attributes. For example, a book is different from all other book because of its subject matter, author, publisher, design characteristic and unique ISBN book number. As a member of entity set of students, you are different from the rest of the student in your college because of your characteristic, such as your social security number, name, and so on.
In addition to entity set, the real world teems with all kinds of relationship. A relationship is an association among member of one or more entity set. A relationship set is a set of similar but distinct relationships of the same type. For example, class enrollment can be regarded as a relationship set between the entities sets of students and courses. The fact that you own a book can be seen as a relationship between you, a member of the entity set of students, and your book, a member of the entity set of textbooks.
One way you can represent entity set in Visual Basic is by using Classes and
Objects. Fore example, the structure of Students below can be use to represent
the student entity set or any its member in terms of their attributes, such as
Student_ID, FirstName, LastName, MajorCode,
YearLevel and BirthDate.
In Visual Basic, you can represents relationship set by providing the former
entity object with an object property to the latter. For example a typical
Enrollment entity might expose a Student entity. The relationship set enrollment
can be modeled using this structure:Student_ID, CourseNumber, AcademicYear,
Semester and FinalLetterGrade
Related articles
Related discussion
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
-
Can you describe Above simple VB6 code?
by pramodmca09 (0 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Wouw, thanks for this great explanation on how to use and make classes. I always coded in VB with function in normal Modules, now i'm going one step further... Trying it out...
!--removed tag-->Great Tutorial !! Helped me a lot
!--removed tag-->[quote user="Developer Fusion Bot"]
This thread is for discussions of Introduction to Class Programming.
[/quote]
This was the best explanation to "class", I have ever come across. Hats off to you.
Hello Sir,
I have just seen u'r examples for class module.u'r explaination is simply superb!!!!
now i clearly understood the class module concept in VB.
Thanks
Bhavani Josyula
It s a great sample about the class programming. However, it s still uncertain for me where I can use this in real life.
Can anyone give me an example ?
what kind of help you wants from me. i mean to clear out your visual basic basics by giving you some tutorials or anything else. bye
I would appericiate if u can show me the way to learn this programe.
TQ
I have worn Google to a frazzle looking for help. most of which was comprised of a few samples.
You have helped "elucidate" me with both the why and how-to and that is no small task.
Thanks so much for your efforts and help.
What a tutorial !! man i like it. this tutorial shows me another side of visual basic wow!!
This is really a good tutorial on Visual Basic. I was really coinfused between let, get properties. But this is the final place which solved ll my problems
vbexplorer.com has also an excellent oop tutorial, if youre looking for some more,
and I have found a german article at vbarchiv.de that seems very good (i can
tell because I studied german when in grad. school, swe).
Maybe I should try an translate it to english...
This thread is for discussions of Introduction to Class Programming.