LAB #4
Console Programming
Starting with
Visual Basic
Console Programming (OOP)
Inheritance
Inheritance: Example
Employee Customer Student
Person
Inheritance: Example
Base Class
Sub Class
Employee Customer Student
Person
Inheritance: Example
Name
Address
Phone
+
Employee Number
Department
Salary
+
Visa Card Number
Bank Account
+
Student Number
Faculty
GPA
Inheritance: How to ??
Class Person
Public Name, Address As string
Public Phone As integer
End Class
Inheritance: How to ??
Class Person
Public Name, Address As string
Public Phone As integer
End Class
Class Employee
Inherits Person
Public Number As integer
Public Department As String
Public Salary As Double
End Class
(Customer , Student)
!!
Your Turn ^_^
Inheritance: Practice
+
Visa Card Number
Bank Account
+
Student Number
Faculty
GPA
(Public Private )
!!
Protected
Inheritance: How to ??
Class Person
Protected Name, Address As string
Protected Phone As integer
End Class
Class Employee
Inherits Person
Public Number As integer
Public Department As String
Public Salary As String
End Class
Find Out At
Moodle
Thank
You
Inheritance

Programming II LAB 4 (OOP) inheritance