Добавил:
ivanov666
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Объектно-ориентированное программирование на языке Visual Basic 2008 в среде разработки Microsoft Visual Studio 2008 и .NET Framework. Часть 2. Учебно
.pdf
..
-
Visual Basic 2008
Microsoft Visual Studio 2008
.NET Framework
2
2010
1

.. - Visual
Basic 2008 Microsoft Visual Studio 2008 .NET Framework: . . 2 /. . . -. - .: , 2010. - 104 .
.
, - Microsoft Visual Basic 2008(Version 9) Microsoft Visual Studio 2008. , , , , Microsoft ADO.NET. , , .
, 230102,
230104, 080502 «
».
., . .. ( ),
., . . .. (),
2

-
, , . -
. .
. ALGOL-68 Pascal . . , . , , . , .
. - , ,
.
.
-
. 1970–. ,
Simula , Smalltalk, C++ Visual Studio .NET.
, , . ,
, .
, ,
.
, , , , . :
. , . , , - .
, - , . -
3

, , , - , , , .
, , ,
.
- –
, , , .
,
. (Shaw M.) : « , , . , ,
, ,
».
. :
, .
,
, .
,
-
, .
, , .
(services), , , . (Meyer
B.) , , . , , .
. -
- ,
. (preconditions), , , (postconditions), ,
. , . , , , . ,
,
4

.
(Exception). Visual Basic 2008
, .. , . , , , , C++ -, Visual Basic 2008
.
, , , . ,
. , ,
,
. . ,
, . , .
, , . . , . ,
, , ,
, , . , .
, -
, , .. . , ,
,
.
(behavior) – ,
. . (state)
. (message) , .
(object) 1981
Simula. (Smith M. and Tockey S.) : « , ( ), ».
, - . , -
.
.
, ,
5

. - ,
.
«» «» ,
, . (identity) ,
, .. , .
, ,
.
, , , , .
. , , , .
. , . , ,
, . ,
, .
-
,
. .
(Alexander C.) “The Timeless Way of
Building” ( ), «
,
, , , , ».
6

1
.
:
x , - .
x .
x .
x Inherits .
x , .
x .
x -
ReDim Preserve.
Visual Basic 2008 - . , - . , .
,
, , ,
, , , . ( )
, ,
, ,
. Visual Basic 2008 . .NET
, , , .
, , , .NET
.
,
– .
, .
,
,
. , .
7

«»(“is-a”), , . ,
.
.
Inheritance, Student,
,
(cName) (cBirthDate) . ,
Name BirthDate.
:
Private cName As String
Private cBirthDate As Date
Public Property Name() As String
Get
Return cName
End Get
Set(ByVal value As String)
cName = value
End Set
End Property
Public Property BirthDate() As Date
Get
Return cBirthDate
End Get
Set(ByVal value As Date)
cBirthDate = value
End Set
End Property
End Class
Public Class Student
Student :
Student.
.
cBirthDate cName ( Private)
.
8

Inheritance Course,
,
(cInformatics)
(cHours). Informatics Hours.
:
Public Class Course
Private cInformatics As String
Private cHours As Single
Public Property Informatics() As String
Get
Return cInformatics
End Get
Set(ByVal value As String)
cInformatics = value
End Set
End Property
Public Property Hours() As Single
Get
Return cHours
End Get
Set(ByVal value As Single)
cHours = value
End Set
End Property
End Class
Course Student Course :
Inherits Student
Course
Public Class Course
Inherits Student
Private cInformatics As String
Private cHours As Single
< O >
End Class
Inherits() ,
, .
,
9

Microsoft.NET Framework.
Inherits ,
, (namespase),
,
Imports. - ,
, System.Math, System.Windows.Forms.Form,
System.Windows System.Diagnostics.
Visual Studio
.
Microsoft Windows
, .NET Framework
Visual Basic
2008, Microsoft Visual C++, Microsoft Visual C#, Microsoft J#
Visual Studio.
Visual Studio ,
Properties
(View ->Property
Pages). : inheritance,
Solution Explorer
, , , Course -
Student.
.
10
Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]
