



SOURCE CODE
UNTUK FORM :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objKuliah As Class_Jurusan
objKuliah = New Class_Jurusan("Akuntansi TSI")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As Integer
x = MsgBox("Anda Belum Membayar Untuk Semester Ini", MsgBoxStyle.OkOnly, "Konfirmasi")
End
End Sub
End Class
UNTUK CLASS :
Public Class Class_Jurusan
Private sNama As String
Private nJurusan As String
Private sFakultas As String
Public Sub New(ByVal sFakultas_Ekonomi As String)
sNama = InputBox("Masukkan nama anda")
nJurusan = "Akuntansi TSI"
sFakultas = "Fakultas Ekonomi"
MsgBox("Nama Anda : " & sNama & " , Jurusan : " & nJurusan & " , Fakultas : " & sFakultas)
End Sub
Public Property sNama_Saya() As String
Get
sNama_Saya = sNama
End Get
Set(ByVal Value As String)
sNama = Value
End Set
End Property
End Class
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objKuliah As Class_Jurusan
objKuliah = New Class_Jurusan("Akuntansi TSI")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As Integer
x = MsgBox("Anda Belum Membayar Untuk Semester Ini", MsgBoxStyle.OkOnly, "Konfirmasi")
End
End Sub
End Class
UNTUK CLASS :
Public Class Class_Jurusan
Private sNama As String
Private nJurusan As String
Private sFakultas As String
Public Sub New(ByVal sFakultas_Ekonomi As String)
sNama = InputBox("Masukkan nama anda")
nJurusan = "Akuntansi TSI"
sFakultas = "Fakultas Ekonomi"
MsgBox("Nama Anda : " & sNama & " , Jurusan : " & nJurusan & " , Fakultas : " & sFakultas)
End Sub
Public Property sNama_Saya() As String
Get
sNama_Saya = sNama
End Get
Set(ByVal Value As String)
sNama = Value
End Set
End Property
End Class