VB NOTES PART 14

VB NOTES PART 14 - 3/22 Object orientation theory Class...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
3/22 Object orientation theory Class definition Student Properties Name Address Major members Methods public or private Calc GPA Send Bill Objects Joe Sue Ed Mary Can think of objects as wrappers around private information Object can control access to its members Student class definition will determine if Joe has access to Mary’s phone number Accessing properties: VB implementation Class definition Instance variables Constructor Properties
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Methods 1. Class definition Public Class Time Most classes public name 2. Instance variables Private MinuteVal As Integer Private SecondVal As Integer Instance variables usually private 3. Constructors What to call to create a new object (Constructor method is used to create object) Public Sub New (ByVal mm As Integer, ByVal ss As Integer) Always no all Return named Value new Can overload the constructor having more than 1 definition of New with different signatures Usually, all they do is set the instance variables MinuteVal = mm
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

VB NOTES PART 14 - 3/22 Object orientation theory Class...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online