Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 14

:

, 2014. .

1. ++...............................................................2
2 MICROSOFT VISUAL BASIC..........................................................................3
3. ..................................................................5
4. ..........................................................................6
5. , ...............................................................7
6. ...........................................................8
7. .........................................................................9
...............................................................................................12

1. C++
C++ Bell Labs
( Bell)

1980-,
C, C (. C
with classes). ,
C++ 1998. ISO/IEC 14882.
C++ C,
:


(, )

(. )

( )
(. namespace)
(. Templates)

(new delete)
:

,
(iostream, fstream, sstream .)

, STL,
(vector), (map), (set), (string), (queue).


, ,
, . (algorithm).

C++ C- ,
C++ C- . C++
C- C++- .


2014.

2. Microsoft visual basic


(. Visual Basic)
(. events) a
COM. Visual Basic .NET.
(. Rapid Application
Development - RAD) (. Graphical User
Interface - GUI),
DAO, RDO ADO, ActiveX .

.
(. Windows API),
.
1991. 'Thunder'.
1991. Windows
(Visual Basic 1.0). MS-DOS
, , , ,
QBASIC. 6.0 (1998),
. .NET .
.NET 2001. .
, '' .


2014.

3.

0 225.

Visual Basic.

Integer
Integer -32,768 32,767.

String
(). Visual Basic 6.0 String
Unicode . ,
, .

Dim VarLenStr As String


Dim FixedLenStr As String * 40


2014.

4.

.
, ,
.
. Sub, a
Function. ( Public)
(Private)
.
.
.
(ByVal) (ByRef).

.

.
Optional,
.
.

Private Function Hipotenuza(ByVal X As Long, optional Y As Long)


as Long
Hipotenuza = sgr(x^2 + y^2)
x=1
y=1
End Sub
.

a=3
b=4
c = Hipotenuza(a,b) nakon izravanja funkcije a=3,b=1,c=5

5. ,
,


2014.


:

,
,
.

Property Get Age() As Integer


Age = Year(Now) - Year(BirthDate)
End Property

.
Property Get Property Letmetode.

.


2014.

6.

,
n, n<= 10, ,
, InpubtBox
.
,
,

.
:
Private Sub Unesi_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Unesi.Click
Dim i, j As Byte
Dim poruka, naslov As String
Dim s(10) As String
n = Val(TextBox1.Text)
If n > 0 And n <= 10 Then
'ucitavanje elemenata matrice
naslov = "Unos elemenata matrice"
For i = 1 To n
For j = 1 To n
poruka = "Unesi A(" & Str(i) & "," & Str(j) & "):"
A(i, j) = Val(InputBox(poruka, naslov))
Next j
Next i
Unesi.Visible = False : Dijagonala.Visible = True
Vrste.Visible = True : Kolone.Visible = True
'prikaz elemenata matrice u TextBoxu
For i = 1 To n
For j = 1 To n
s(i) = s(i) + Space(5 - Len(Str(A(i, j)))) + Str(A(i,_
j))
Next j
Next i
TextBox2.Lines = s
Else : TextBox1.Text = "" : TextBox1.Focus()
End If
End Sub


2014.

:
Private Sub Dijagonala_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Dijagonala.Click
Dim di As Integer
Dim i, j As Byte
di = 0
For i = 1 To n
di = di + A(i, i)
Next i
Label5.Text = "Suma elemenata na glavnoj dijagonali je: " & Str(di)
Dijagonala.Visible = False
End Sub

:
Private Sub Vrste_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Vrste.Click
Dim i, j As Byte
Dim V(10) As Integer
Dim SV(10) As String
For i = 1 To n
V(i) = 0
For j = 1 To n
V(i) = V(i) + A(i, j)
Next j
Next i
For i = 1 To n
SV(i) = "V(" & Str(i) & ") =" & Space(8 - Len(Str(V(i)))) &
Str(V(i))
Next i
TextBox3.Lines = SV
Vrste.Visible = False
End Sub

:
Private Sub Kolone_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Kolone.Click
Dim i, j As Byte
Dim K(10) As Integer
Dim sk(10) As String
For j = 1 To n
K(j) = 0
For i = 1 To n
K(j) = K(j) + A(i, j)
Next i
Next j
For j = 1 To n
sk(j) = "K(" & Str(j) & ") =" & Space(8 - Len(Str(K(j)))) &
Str(K(j))
Next j
TextBox4.Lines = sk
Kolone.Visible = False
End Sub
End Class


2014.
:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If TextBox1.Text = My.Settings.Username And TextBox2.Text =
My.Settings.Password Then
Form2.Show()
Me.Hide()
Else
MsgBox("Pogresne informacije unete, korisnicki nalog ili
sifra", MsgBoxStyle.Information, "Greska")
End If
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles
LinkLabel1.LinkClicked
Form3.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class


2014.

7.
:


2014.

n :


2014.


2014.

http://www.visualstudio.com/
http://en.wikipedia.org/wiki/Visual_Basic
Osnovi Programiranja sa resenim zadacima u Visual Basicu, Univerzitet u
Beogradu, Saobracajni Fakultet, Dr Sladjana Mladenovic, Ana Uzelac

You might also like