'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("8b a5-46bb-a6a9-87b4949d1f4c")>

Size: px
Start display at page:

Download "'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("8b a5-46bb-a6a9-87b4949d1f4c")>"

Transcription

1 LAMPIRAN A : LISTING PROGRAM Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("ClusteringFuzzyCMeans")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("ClusteringFuzzyCMeans")> <Assembly: AssemblyCopyright("Copyright 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("8b a5-46bb-a6a9-87b4949d1f4c")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion(" ")> <Assembly: AssemblyFileVersion(" ")> Public Class AddForm Private Sub SimpleButton1_Click(sender As System.Object, e As System.EventArgs) Handles SimpleButton1.Click Me.Close() Private Sub SimpleButton2_Click(sender As System.Object, e As System.EventArgs) Handles SimpleButton2.Click If txtipa.text = "" Or Not IsNumeric(txtIPA.Text) Then General.ErrorMsg("Nilai IPA tidak boleh kosong dan harus bilangan") Return ElseIf txtips.text = "" Or Not IsNumeric(txtIPS.Text) Then General.ErrorMsg("Nilai IPS tidak boleh kosong dan harus bilangan") Return ElseIf txtbahasa.text = "" Or Not IsNumeric(txtBahasa.Text) Then General.ErrorMsg("Nilai Bahasa tidak boleh kosong dan harus bilangan") Return ElseIf txtdisarankan.selectedindex = -1 Then General.ErrorMsg("Silahkan pilih salah satu bidang yang disarankan")

2 Return End If 'k-means frmhome.matrixkmeans.clusterx1.element.add(cdec(txtipa.text)) frmhome.matrixkmeans.clusterx1.elementderajatkeanggotaan.add(general.random) frmhome.matrixkmeans.clusterx1.setsumkuadratderajatkeanggotaan() frmhome.matrixkmeans.clusterx2.element.add(cdec(txtips.text)) frmhome.matrixkmeans.clusterx2.elementderajatkeanggotaan.add(general.random) frmhome.matrixkmeans.clusterx2.setsumkuadratderajatkeanggotaan() frmhome.matrixkmeans.clusterx3.element.add(cdec(txtbahasa.text)) frmhome.matrixkmeans.clusterx3.elementderajatkeanggotaan.add(general.random) frmhome.matrixkmeans.clusterx3.setsumkuadratderajatkeanggotaan() frmhome.matrixkmeans.manualdecision.add(txtdisarankan.selectedtext) 'C-Means Minimum variance frmhome.matrixcmin.clusterx1.element.add(cdec(txtipa.text)) frmhome.matrixcmin.clusterx1.elementderajatkeanggotaan.add(general.random) frmhome.matrixcmin.clusterx1.setsumkuadratderajatkeanggotaan() frmhome.matrixcmin.clusterx2.element.add(cdec(txtips.text)) frmhome.matrixcmin.clusterx2.elementderajatkeanggotaan.add(general.random) frmhome.matrixcmin.clusterx2.setsumkuadratderajatkeanggotaan() frmhome.matrixcmin.clusterx3.element.add(cdec(txtbahasa.text)) frmhome.matrixcmin.clusterx3.elementderajatkeanggotaan.add(general.random) frmhome.matrixcmin.clusterx3.setsumkuadratderajatkeanggotaan() frmhome.matrixcmin.manualdecision.add(txtdisarankan.selectedtext) 'k-means Maximum variance frmhome.matrixcmax.clusterx1.element.add(cdec(txtipa.text)) frmhome.matrixcmax.clusterx1.elementderajatkeanggotaan.add(general.random) frmhome.matrixcmax.clusterx1.setsumkuadratderajatkeanggotaan() frmhome.matrixcmax.clusterx2.element.add(cdec(txtips.text)) frmhome.matrixcmax.clusterx2.elementderajatkeanggotaan.add(general.random) frmhome.matrixcmax.clusterx2.setsumkuadratderajatkeanggotaan() frmhome.matrixcmax.clusterx3.element.add(cdec(txtbahasa.text)) frmhome.matrixcmax.clusterx3.elementderajatkeanggotaan.add(general.random) frmhome.matrixcmax.clusterx3.setsumkuadratderajatkeanggotaan() frmhome.matrixcmax.manualdecision.add(txtdisarankan.selectedtext) frmhome.displaydata() Me.Close() Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Me.CloseBox = False End Class Imports System.ComponentModel Imports DevExpress.Skins Imports DevExpress.LookAndFeel Imports DevExpress.UserSkins Imports DevExpress.XtraEditors

3 Imports DevExpress.XtraCharts Imports DevExpress.XtraSplashScreen Public Class frmhome Public matrixkmeans As New Matrix Public matrixcmin As New Matrix Public matrixcmax As New Matrix Public tempcmin As String = "" Public tempcmax As String = "" Public tempkmeans As String = "" Public tempmatrixkmeans As Matrix Public tempmatrixcmin As Matrix Public tempmatrixcmax As Matrix Dim maxiterasi As Integer = 100 Dim IPA As Integer = 0 Dim IPS As Integer = 0 Dim Bahasa As Integer = 0 Dim Akurat As Integer = 0 Dim TidakAkurat As Integer = 0 Dim Filename As String = "" Sub New() InitSkins() InitializeComponent() 'CMeansProcess() Sub InitSkins() DevExpress.Skins.SkinManager.EnableFormSkins() DevExpress.UserSkins.BonusSkins.Register() UserLookAndFeel.Default.SetSkinStyle("DevExpress Style") Public Sub KMeansProcess() Dim ObjectiveFunctionBefore As Decimal = 0.0 Dim ObjectiveFunction As Decimal = 0.0 Dim iteration As Integer = 1 tempkmeans = "" Try 'If Not (Filename = txtfilename.text) Then ' matrix.getdatafromfile(txtfilename.text) ' Filename = txtfilename.text 'End If SplashScreenManager.Default.SetWaitFormDescription("Iterasi ke - " & iteration & " K- Means") tempmatrixkmeans = matrixkmeans 'For i = 0 To matrix.clusterx1.element.count - 1 ' temp += matrix.clusterx1.element(i) & " - " & matrix.clusterx2.element(i) & " - " & matrix.clusterx3.element(i) & ' " - " & matrix.clusterx1.elementderajatkeanggotaan(i) & " - " & matrix.clusterx2.elementderajatkeanggotaan(i) & " - " & matrix.clusterx3.elementderajatkeanggotaan(i) & 'Next

4 'txtresult.text = temp matrixkmeans.setcentercluster() tempmatrixkmeans.setcentercluster() ObjectiveFunction = tempmatrixkmeans.getobjectivefunction tempkmeans += "Iteration count = " & iteration & ", obj.fcn = " & ObjectiveFunction & tempkmeans += tempmatrixkmeans.centercluster(0, 0) & " " & tempmatrixkmeans.centercluster(0, 1) & " " & tempmatrixkmeans.centercluster(0, 2) & tempkmeans += tempmatrixkmeans.centercluster(1, 0) & " " & tempmatrixkmeans.centercluster(1, 1) & " " & tempmatrixkmeans.centercluster(1, 2) & tempkmeans += tempmatrixkmeans.centercluster(2, 0) & " " & tempmatrixkmeans.centercluster(2, 1) & " " & tempmatrixkmeans.centercluster(2, 2) & 'new mtrix 'Dim matrix1 As Matrix While ((Math.Abs(ObjectiveFunction - ObjectiveFunctionBefore)) > ) And (iteration < maxiterasi) Try SplashScreenManager.Default.SetWaitFormDescription("Iterasi ke - " & iteration & " K- Means") Console.WriteLine(iteration) iteration += 1 Dim matrix1 = tempmatrixkmeans.generatenewmatrixkmeans ObjectiveFunctionBefore = ObjectiveFunction 'For i = 0 To matrix1.clusterx1.element.count - 1 ' temp += matrix1.clusterx1.element(i) & " - " & matrix1.clusterx2.element(i) & " - " & matrix1.clusterx3.element(i) & ' " - " & matrix1.clusterx1.elementderajatkeanggotaan(i) & " - " & matrix1.clusterx2.elementderajatkeanggotaan(i) & " - " & matrix1.clusterx3.elementderajatkeanggotaan(i) & 'Next 'temp += & & temp matrix1.setcentercluster() ObjectiveFunction = matrix1.getobjectivefunction tempkmeans += "Iteration count = " & iteration & ", obj.fcn = " & ObjectiveFunction & tempkmeans += matrix1.centercluster(0, 0) & " " & matrix1.centercluster(0, 1) & " " & matrix1.centercluster(0, 2) & tempkmeans += matrix1.centercluster(1, 0) & " " & matrix1.centercluster(1, 1) & " " & matrix1.centercluster(1, 2) & tempkmeans += matrix1.centercluster(2, 0) & " " & matrix1.centercluster(2, 1) & " " & matrix1.centercluster(2, 2) & tempmatrixkmeans = Nothing tempmatrixkmeans = matrix1 matrix1 = Nothing Catch ex As Exception General.ErrorMsg(ex.Message) Exit While End Try End While

5 SplashScreenManager.Default.SetWaitFormDescription("Display result") Catch ex As Exception General.ErrorMsg(ex.Message) SplashScreenManager.CloseForm(False) End Try Public Sub CMeansMinProcess() Dim ObjectiveFunctionBefore As Decimal = 0.0 Dim ObjectiveFunction As Decimal = 0.0 Dim iteration As Integer = 1 tempcmin = "" Try 'If Not (Filename = txtfilename.text) Then ' matrix.getdatafromfile(txtfilename.text) ' Filename = txtfilename.text 'End If SplashScreenManager.Default.SetWaitFormDescription("Iterasi ke - " & iteration) tempmatrixcmin = matrixcmin 'For i = 0 To matrix.clusterx1.element.count - 1 ' temp += matrix.clusterx1.element(i) & " - " & matrix.clusterx2.element(i) & " - " & matrix.clusterx3.element(i) & ' " - " & matrix.clusterx1.elementderajatkeanggotaan(i) & " - " & matrix.clusterx2.elementderajatkeanggotaan(i) & " - " & matrix.clusterx3.elementderajatkeanggotaan(i) & 'Next 'txtresult.text = temp matrixcmin.setcentercluster() tempmatrixcmin.setcentercluster() ObjectiveFunction = tempmatrixcmin.getobjectivefunction tempcmin += "Iteration count = " & iteration & ", obj.fcn = " & ObjectiveFunction & tempcmin += tempmatrixcmin.centercluster(0, 0) & " " & tempmatrixcmin.centercluster(0, 1) & " " & tempmatrixcmin.centercluster(0, 2) & tempcmin += tempmatrixcmin.centercluster(1, 0) & " " & tempmatrixcmin.centercluster(1, 1) & " " & tempmatrixcmin.centercluster(1, 2) & tempcmin += tempmatrixcmin.centercluster(2, 0) & " " & tempmatrixcmin.centercluster(2, 1) & " " & tempmatrixcmin.centercluster(2, 2) & TidakAkurat = tempmatrixcmin.manualdecision.count 'new mtrix 'Dim matrix1 As Matrix While ((Math.Abs(ObjectiveFunction - ObjectiveFunctionBefore)) > ) And (iteration < maxiterasi) Try SplashScreenManager.Default.SetWaitFormDescription("Iterasi ke - " & iteration) Console.WriteLine(iteration) iteration += 1 Dim matrix1 = tempmatrixcmin.generatenewmatrix ObjectiveFunctionBefore = ObjectiveFunction 'For i = 0 To matrix1.clusterx1.element.count - 1 ' temp += matrix1.clusterx1.element(i) & " - " & matrix1.clusterx2.element(i) & " - " & matrix1.clusterx3.element(i) &

6 ' " - " & matrix1.clusterx1.elementderajatkeanggotaan(i) & " - " & matrix1.clusterx2.elementderajatkeanggotaan(i) & " - " & matrix1.clusterx3.elementderajatkeanggotaan(i) & 'Next 'temp += & & temp matrix1.setcentercluster() ObjectiveFunction = matrix1.getobjectivefunction tempcmin += "Iteration count = " & iteration & ", obj.fcn = " & ObjectiveFunction & tempcmin += matrix1.centercluster(0, 0) & " " & matrix1.centercluster(0, 1) & " " & matrix1.centercluster(0, 2) & tempcmin += matrix1.centercluster(1, 0) & " " & matrix1.centercluster(1, 1) & " " & matrix1.centercluster(1, 2) & tempcmin += matrix1.centercluster(2, 0) & " " & matrix1.centercluster(2, 1) & " " & matrix1.centercluster(2, 2) & tempmatrixcmin = Nothing tempmatrixcmin = matrix1 matrix1 = Nothing Catch ex As Exception General.ErrorMsg(ex.Message) Exit While End Try End While SplashScreenManager.Default.SetWaitFormDescription("Display result") Catch ex As Exception General.ErrorMsg(ex.Message) SplashScreenManager.CloseForm(False) End Try Public Sub CMeansMaxProcess() Dim ObjectiveFunctionBefore As Decimal = 0.0 Dim ObjectiveFunction As Decimal = 0.0 Dim iteration As Integer = 1 tempcmax = "" Try 'If Not (Filename = txtfilename.text) Then ' matrix.getdatafromfile(txtfilename.text) ' Filename = txtfilename.text 'End If SplashScreenManager.Default.SetWaitFormDescription("Iterasi ke - " & iteration & " C-Means Max variance") tempmatrixcmax = matrixcmax 'For i = 0 To matrix.clusterx1.element.count - 1 ' temp += matrix.clusterx1.element(i) & " - " & matrix.clusterx2.element(i) & " - " & matrix.clusterx3.element(i) & ' " - " & matrix.clusterx1.elementderajatkeanggotaan(i) & " - " & matrix.clusterx2.elementderajatkeanggotaan(i) & " - " & matrix.clusterx3.elementderajatkeanggotaan(i) & 'Next 'txtresult.text = temp matrixcmax.setcentercluster() tempmatrixcmax.setcentercluster() ObjectiveFunction = tempmatrixcmax.getobjectivefunction

7 tempcmax += "Iteration count = " & iteration & ", obj.fcn = " & ObjectiveFunction & tempcmax += tempmatrixcmax.centercluster(0, 0) & " " & tempmatrixcmax.centercluster(0, 1) & " " & tempmatrixcmax.centercluster(0, 2) & tempcmax += tempmatrixcmax.centercluster(1, 0) & " " & tempmatrixcmax.centercluster(1, 1) & " " & tempmatrixcmax.centercluster(1, 2) & tempcmax += tempmatrixcmax.centercluster(2, 0) & " " & tempmatrixcmax.centercluster(2, 1) & " " & tempmatrixcmax.centercluster(2, 2) & 'new mtrix 'Dim matrix1 As Matrix While ((Math.Abs(ObjectiveFunction - ObjectiveFunctionBefore)) > ) And (iteration < maxiterasi) Try SplashScreenManager.Default.SetWaitFormDescription("Iterasi ke - " & iteration & " C- Means Max variance") Console.WriteLine(iteration) iteration += 1 Dim matrix1 = tempmatrixcmax.generatenewmatrix ObjectiveFunctionBefore = ObjectiveFunction 'For i = 0 To matrix1.clusterx1.element.count - 1 ' temp += matrix1.clusterx1.element(i) & " - " & matrix1.clusterx2.element(i) & " - " & matrix1.clusterx3.element(i) & ' " - " & matrix1.clusterx1.elementderajatkeanggotaan(i) & " - " & matrix1.clusterx2.elementderajatkeanggotaan(i) & " - " & matrix1.clusterx3.elementderajatkeanggotaan(i) & 'Next 'temp += & & temp matrix1.setcentercluster() ObjectiveFunction = matrix1.getobjectivefunction tempcmax += "Iteration count = " & iteration & ", obj.fcn = " & ObjectiveFunction & tempcmax += matrix1.centercluster(0, 0) & " " & matrix1.centercluster(0, 1) & " " & matrix1.centercluster(0, 2) & tempcmax += matrix1.centercluster(1, 0) & " " & matrix1.centercluster(1, 1) & " " & matrix1.centercluster(1, 2) & tempcmax += matrix1.centercluster(2, 0) & " " & matrix1.centercluster(2, 1) & " " & matrix1.centercluster(2, 2) & tempmatrixcmax = Nothing tempmatrixcmax = matrix1 matrix1 = Nothing Catch ex As Exception General.ErrorMsg(ex.Message) Exit While End Try End While SplashScreenManager.Default.SetWaitFormDescription("Display result") Catch ex As Exception General.ErrorMsg(ex.Message) SplashScreenManager.CloseForm(False) End Try Private Sub btnstartprocess_click(sender As System.Object, e As System.EventArgs) Handles btnstartprocess.click

8 SplashScreenManager.ShowForm(Me, GetType(WaitForm1), True, True, False) KMeansProcess() CMeansMinProcess() CMeansMaxProcess() Dim ucresult As New ucresult Me.Controls.Add(ucResult) ucresult.location = New Point(0, 0) PanelControl1.Visible = False SplashScreenManager.CloseForm(False) Private Sub btnselectfile_click(sender As System.Object, e As System.EventArgs) Handles btnselectfile.click OpenFileDialog1.Filter = "Microsoft Excel Comma Separated Values File *.csv" OpenFileDialog1.InitialDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) OpenFileDialog1.FileName = "" OpenFileDialog1.ShowDialog() Private Sub OpenFileDialog1_FileOk(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk txtfilename.text = OpenFileDialog1.FileName matrixkmeans.getdatafromfile(txtfilename.text) matrixcmin.getdatafromfile(txtfilename.text) matrixcmax.getdatafromfile(txtfilename.text) DisplayData() Public Sub DisplayData() lstdata.items.clear() For i = 0 To matrixkmeans.clusterx1.element.count - 1 lstdata.items.add(new ListViewItem({i + 1, matrixkmeans.clusterx1.element(i), matrixkmeans.clusterx2.element(i), matrixkmeans.clusterx3.element(i), matrixkmeans.clusterx1.elementderajatkeanggotaan(i), matrixkmeans.clusterx2.elementderajatkeanggotaan(i), matrixkmeans.clusterx3.elementderajatkeanggotaan(i), "", "", "", ""})) Next Private Sub chart_customdrawseriespoint(sender As System.Object, e As DevExpress.XtraCharts.CustomDrawSeriesPointEventArgs) e.legendtext = e.seriespoint.argument Private Sub chartakurat_customdrawseriespoint(sender As System.Object, e As DevExpress.XtraCharts.CustomDrawSeriesPointEventArgs) e.legendtext = e.seriespoint.argument Private Sub btnadddata_click(sender As System.Object, e As System.EventArgs) Handles btnadddata.click AddForm.ShowDialog() End Class Public Class General Public Shared Sub ErrorMsg(ByVal message As String, Optional ByVal Title As String = "Error")

9 MsgBox(message, MsgBoxStyle.Critical, Title) Public Shared Function Random() As Decimal Static rnd As New Random Return Math.Round(rnd.NextDouble(), 4) End Class Public Class Matrix Public Property ClusterX1() As Cluster Public Property ClusterX2() As Cluster Public Property ClusterX3() As Cluster Public Property ManualDecision As List(Of String) Public CenterCluster(3, 3) As Decimal Public Sub New() ClusterX1 = New Cluster ClusterX2 = New Cluster ClusterX3 = New Cluster ManualDecision = New List(Of String) Public Sub GetDataFromFile(ByVal FileName As String) ClusterX1.Element.Clear() ClusterX2.Element.Clear() ClusterX3.Element.Clear() ClusterX1.ElementDerajatKeanggotaan.Clear() ClusterX2.ElementDerajatKeanggotaan.Clear() ClusterX3.ElementDerajatKeanggotaan.Clear() Using reader As New System.IO.StreamReader(FileName) Try While Not (reader.endofstream) Dim line As String = reader.readline Dim linearray = line.split(";") ClusterX1.Element.Add(CDec(lineArray(0))) ClusterX2.Element.Add(CDec(lineArray(1))) ClusterX3.Element.Add(CDec(lineArray(2))) ManualDecision.Add(lineArray(3)) End While ClusterX1.SetDerajatKeanggotaan() ClusterX1.SetSumKuadratDerajatKeanggotaan() ClusterX2.SetDerajatKeanggotaan() ClusterX2.SetSumKuadratDerajatKeanggotaan() ClusterX3.SetDerajatKeanggotaan() ClusterX3.SetSumKuadratDerajatKeanggotaan() Catch ex As Exception ClusterX1.Element.Clear() ClusterX2.Element.Clear() ClusterX3.Element.Clear() ManualDecision.Clear() General.ErrorMsg(ex.Message) End Try End Using Public Sub SetCenterCluster()

10 CenterCluster(0, 0) = GetCenterCulsterPointX(ClusterX1, ClusterX1) CenterCluster(0, 1) = GetCenterCulsterPointX(ClusterX1, ClusterX2) CenterCluster(0, 2) = GetCenterCulsterPointX(ClusterX1, ClusterX3) CenterCluster(1, 0) = GetCenterCulsterPointX(ClusterX2, ClusterX1) CenterCluster(1, 1) = GetCenterCulsterPointX(ClusterX2, ClusterX2) CenterCluster(1, 2) = GetCenterCulsterPointX(ClusterX2, ClusterX3) CenterCluster(2, 0) = GetCenterCulsterPointX(ClusterX2, ClusterX1) CenterCluster(2, 1) = GetCenterCulsterPointX(ClusterX2, ClusterX2) CenterCluster(2, 2) = GetCenterCulsterPointX(ClusterX2, ClusterX3) Public Function GetCenterCulsterPointX(ByVal cluster As Cluster, ByVal clusterpoint As Cluster) As Decimal Dim result As Decimal = 0.0 For i = 0 To cluster.element.count - 1 result += (cluster.getkuadratderajatkeanggotaan(i) * clusterpoint.element(i)) Next Return Math.Round(result / cluster.sumkuadratderajatkeanggotaan, 2) Public Function GetLValue(ByVal cluster1 As Cluster, ByVal cluster2 As Cluster, ByVal cluster3 As Cluster, ByVal membershipdegree As Decimal, ByVal centercluster As Array, ByVal i As Integer, ByVal k As Integer) As Decimal Return (Math.Pow((cluster1.Element(i) - centercluster(k, 0)), 2) + Math.Pow((cluster2.Element(i) - centercluster(k, 1)), 2) + Math.Pow((cluster3.Element(i) - centercluster(k, 2)), 2)) * membershipdegree Public Function GetLTValue(ByVal i As Integer) As Decimal Return (GetLValue(ClusterX1, ClusterX2, ClusterX3, ClusterX1.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 0) + GetLValue(ClusterX1, ClusterX2, ClusterX3, ClusterX2.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 1) + GetLValue(ClusterX1, ClusterX2, ClusterX3, ClusterX3.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 2)) Public Function GetObjectiveFunction() As Decimal Dim result As Decimal = 0.0 For i = 0 To ClusterX1.Element.Count - 1 result += GetLTValue(i) Next Return result Public Function GenerateNewMatrix() As Matrix Dim matrix As New Matrix 'For i = 0 To ClusterX1.Element.Count - 1 ' matrix.clusterx1.element.add(math.round(getlvalue(clusterx1, ClusterX2, ClusterX3, ClusterX1.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 0) / GetLTValue(i), 4)) ' matrix.clusterx2.element.add(math.round(getlvalue(clusterx1, ClusterX2, ClusterX3, ClusterX2.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 1) / GetLTValue(i), 4)) ' matrix.clusterx3.element.add(math.round(getlvalue(clusterx1, ClusterX2, ClusterX3, ClusterX3.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 2) / GetLTValue(i), 4)) 'Next

11 'matrix.clusterx1.setderajatkeanggotaan() 'matrix.clusterx1.setsumkuadratderajatkeanggotaan() 'matrix.clusterx2.setderajatkeanggotaan() 'matrix.clusterx2.setsumkuadratderajatkeanggotaan() 'matrix.clusterx3.setderajatkeanggotaan() 'matrix.clusterx3.setsumkuadratderajatkeanggotaan() matrix.clusterx1.element = ClusterX1.Element matrix.clusterx2.element = ClusterX2.Element matrix.clusterx3.element = ClusterX3.Element For i = 0 To ClusterX1.Element.Count - 1 matrix.clusterx1.elementderajatkeanggotaan.add(math.round(getlvalue(clusterx1, ClusterX2, ClusterX3, ClusterX1.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 0) / GetLTValue(i), 4)) matrix.clusterx2.elementderajatkeanggotaan.add(math.round(getlvalue(clusterx1, ClusterX2, ClusterX3, ClusterX2.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 1) / GetLTValue(i), 4)) matrix.clusterx3.elementderajatkeanggotaan.add(math.round(getlvalue(clusterx1, ClusterX2, ClusterX3, ClusterX3.GetKuadratDerajatKeanggotaan(i), CenterCluster, i, 2) / GetLTValue(i), 4)) Next matrix.clusterx1.setsumkuadratderajatkeanggotaan() matrix.clusterx2.setsumkuadratderajatkeanggotaan() matrix.clusterx3.setsumkuadratderajatkeanggotaan() Return matrix Public Function GenerateNewMatrixKMeans() As Matrix Dim matrix As New Matrix matrix.clusterx1.element = ClusterX1.Element matrix.clusterx2.element = ClusterX2.Element matrix.clusterx3.element = ClusterX3.Element For i = 0 To ClusterX1.Element.Count - 1 matrix.clusterx1.elementderajatkeanggotaan.add(math.pow(clusterx1.elementderajatkeanggotaan (i), 2)) matrix.clusterx2.elementderajatkeanggotaan.add(math.pow(clusterx2.elementderajatkeanggotaan (i), 2)) matrix.clusterx3.elementderajatkeanggotaan.add(math.pow(clusterx2.elementderajatkeanggotaan (i), 2)) Next matrix.clusterx1.setsumkuadratderajatkeanggotaan() matrix.clusterx2.setsumkuadratderajatkeanggotaan() matrix.clusterx3.setsumkuadratderajatkeanggotaan() Return matrix End Class

12 Imports DevExpress.XtraCharts Public Class ucresult Dim IPAKMeans As Integer = 0 Dim IPSKMeans As Integer = 0 Dim BahasaKMeans As Integer = 0 Dim AkuratKMeans As Integer = 0 Dim TdkAkuratKMeans As Integer = 0 Dim IPACMin As Integer = 0 Dim IPSCMin As Integer = 0 Dim BahasaCMin As Integer = 0 Dim AkuratCMin As Integer = 0 Dim TdkAkuratCMin As Integer = 0 Dim IPACMax As Integer = 0 Dim IPSCMax As Integer = 0 Dim BahasaCMax As Integer = 0 Dim AkuratCMax As Integer = 0 Dim TdkAkuratCMax As Integer = 0 Private Sub btnback_click(sender As System.Object, e As System.EventArgs) Handles btnback.click Me.ParentForm.Controls.Remove(Me) frmhome.panelcontrol1.visible = True Public Sub DisplayListViewData(ByVal lstdata As Windows.Forms.ListView, ByVal LastMatrix As Matrix, ByVal matrix As Matrix, ByRef IPA As Integer, ByRef IPS As Integer, ByRef Bahasa As Integer, ByRef Akurat As Integer, ByRef TidakAkurat As Integer) lstdata.items.clear() For i = 0 To LastMatrix.ClusterX1.Element.Count - 1 Dim temp = KecenderunganDataCluster(LastMatrix, matrix, i, IPA, IPS, Bahasa, Akurat, TidakAkurat) lstdata.items.add(new ListViewItem({i + 1, matrix.clusterx1.element(i), matrix.clusterx2.element(i), matrix.clusterx3.element(i), LastMatrix.ClusterX1.ElementDerajatKeanggotaan(i), LastMatrix.ClusterX2.ElementDerajatKeanggotaan(i), LastMatrix.ClusterX3.ElementDerajatKeanggotaan(i), temp(0), temp(1), temp(2), temp(3)})) Next Public Function KecenderunganDataCluster(ByVal LastMatrix As Matrix, ByVal matrix As Matrix, ByVal index As Integer, ByRef IPA As Integer, ByRef IPS As Integer, ByRef Bahasa As Integer, ByRef Akurat As Integer, ByRef TidakAkurat As Integer) As List(Of String) Dim result As New List(Of String) result.add("") result.add("") result.add("") result.add("tidak Akurat") If (LastMatrix.ClusterX1.ElementDerajatKeanggotaan(index) > LastMatrix.ClusterX2.ElementDerajatKeanggotaan(index)) Then If (LastMatrix.ClusterX1.ElementDerajatKeanggotaan(index) > LastMatrix.ClusterX3.ElementDerajatKeanggotaan(index)) Then

13 result(0) = "True" IPA += 1 Else result(2) = "True" Bahasa += 1 End If Else If (LastMatrix.ClusterX2.ElementDerajatKeanggotaan(index) > LastMatrix.ClusterX3.ElementDerajatKeanggotaan(index)) Then result(1) = "True" IPS += 1 Else result(2) = "True" Bahasa += 1 End If End If If (matrix.manualdecision(index) = "IPA") And (result(0) = "True") Then result(3) = "Akurat" Akurat += 1 TidakAkurat -= 1 ElseIf (matrix.manualdecision(index) = "IPS") And (result(1) = "True") Then result(3) = "Akurat" Akurat += 1 TidakAkurat -= 1 ElseIf (matrix.manualdecision(index) = "Bahasa") And (result(2) = "True") Then result(3) = "Akurat" Akurat += 1 TidakAkurat -= 1 End If Return result Public Sub DrawChart(ByVal chart As DevExpress.XtraCharts.ChartControl, ByVal chartakurat As DevExpress.XtraCharts.ChartControl, ByVal IPA As Integer, ByVal IPS As Integer, ByVal Bahasa As Integer, ByVal Akurat As Integer, ByVal TidakAkurat As Integer) chart.series(0).points.removerange(0, 3) chart.series(0).points.add(new SeriesPoint("IPA", IPA)) chart.series(0).points.add(new SeriesPoint("IPS", IPS)) chart.series(0).points.add(new SeriesPoint("Bahasa", Bahasa)) chartakurat.series(0).points.removerange(0, 2) chartakurat.series(0).points.add(new SeriesPoint("Akurat", Akurat)) chartakurat.series(0).points.add(new SeriesPoint("Tidak Akurat", TidakAkurat)) Private Sub ucresult_load(sender As Object, e As System.EventArgs) Handles Me.Load TdkAkuratKMeans = frmhome.matrixkmeans.manualdecision.count DisplayListViewData(lstDataKmeans, frmhome.tempmatrixkmeans, frmhome.matrixkmeans, IPAKMeans, IPSKMeans, BahasaKMeans, AkuratKMeans, TdkAkuratKMeans) txtresultkmeans.text = frmhome.tempkmeans DrawChart(ChartPKMeans, chartakuratkmeans, IPAKMeans, IPSKMeans, BahasaKMeans, AkuratKMeans, TdkAkuratKMeans) TdkAkuratCMin = frmhome.matrixcmin.manualdecision.count

14 DisplayListViewData(lstDataCmin, frmhome.tempmatrixcmin, frmhome.matrixcmin, IPACMin, IPSCMin, BahasaCMin, AkuratCMin, TdkAkuratCMin) txtresultcmin.text = frmhome.tempcmin DrawChart(ChartPCMin, chartakuratcmin, IPACMin, IPSCMin, BahasaCMin, AkuratCMin, TdkAkuratCMin) TdkAkuratCMax = frmhome.matrixcmax.manualdecision.count DisplayListViewData(lstDataCmax, frmhome.tempmatrixcmax, frmhome.matrixcmax, IPACMax, IPSCMax, BahasaCMax, AkuratCMax, TdkAkuratCMax) txtresultcmax.text = frmhome.tempcmax DrawChart(ChartPCMax, chartakuratcmax, IPACMax, IPSCMax, BahasaCMax, AkuratCMax, TdkAkuratCMax) End Class Public Class WaitForm1 Sub New InitializeComponent() Me.progressPanel1.AutoHeight = True Public Overrides Sub SetCaption(ByVal caption As String) MyBase.SetCaption(caption) Me.progressPanel1.Caption = caption Public Overrides Sub SetDescription(ByVal description As String) MyBase.SetDescription(description) Me.progressPanel1.Description = description Public Overrides Sub ProcessCommand(ByVal cmd As System.Enum, ByVal arg As Object) MyBase.ProcessCommand(cmd, arg) Public Enum WaitFormCommand SomeCommandId End Enum End Class

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution

More information

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara A-1 LISTING PROGRAM mainform.vb Imports System.IO Public Class mainform Private Sub mainform_load(byval sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load enkripsirb.checked = True

More information

LAMPIRAN A: Listing Program

LAMPIRAN A: Listing Program 67 1. Form Menu Utama LAMPIRAN A: Listing Program Public Class MScreen Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() Form1.Show()

More information

Instant Autosesk Revit 2013 Customization with.net How-to: Bonus Section

Instant Autosesk Revit 2013 Customization with.net How-to: Bonus Section Instant Autosesk Revit 2013 Customization with.net How-to: Bonus Section This is the bonus section of the book Instant Autosesk Revit 2013 Customization with.net How-to. Here we are going to cover recipes

More information

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals VARIABLES WHAT IS A VARIABLE? A variable is a storage location in the computer s memory, used for holding information while the program is running. The information that is stored in a variable may change,

More information

Computing Science Unit 1

Computing Science Unit 1 Computing Science Unit 1 Software Design and Development Programming Practical Tasks Business Information Technology and Enterprise Contents Input Validation Find Min Find Max Linear Search Count Occurrences

More information

Revision for Final Examination (Second Semester) Grade 9

Revision for Final Examination (Second Semester) Grade 9 Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual

More information

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions Between the comments included with the code and the code itself, you shouldn t have any problems understanding what

More information

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types Managing Data Unit 4 Managing Data Introduction Lesson 4.1 Data types We come across many types of information and data in our daily life. For example, we need to handle data such as name, address, money,

More information

Final Exam 7:00-10:00pm, April 14, 2008

Final Exam 7:00-10:00pm, April 14, 2008 Name:, (last) (first) Student Number: Section: Instructor: _P. Cribb_ L. Lowther_(circle) York University Faculty of Science and Engineering Department of Computer Science and Engineering Final Exam 7:00-10:00pm,

More information

Lampiran 1 Kode Program

Lampiran 1 Kode Program 53 Lampiran 1 Kode Program Kode Program 1 Kode Menu Peminjaman Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_Cari.Click Call CariKaset() Private Sub RB_CheckedChanged(ByVal

More information

Design Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report

Design Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report Design Of Human Computer Interfaces Assignment 1- Hello World Compliance Report Prepared for: Skip Poehlman Prepared By: K C Course: SE 4D03 Date: September 30, 2008 Contents 1. Code Listing a. Module

More information

Learning VB.Net. Tutorial 19 Classes and Inheritance

Learning VB.Net. Tutorial 19 Classes and Inheritance Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you

More information

To enter the number in decimals Label 1 To show total. Text:...

To enter the number in decimals Label 1 To show total. Text:... Visual Basic tutorial - currency converter We will use visual studio to create a currency converter where we can convert a UK currency pound to other currencies. This is the interface for the application.

More information

Decision Structures. Start. Do I have a test in morning? Study for test. Watch TV tonight. Stop

Decision Structures. Start. Do I have a test in morning? Study for test. Watch TV tonight. Stop Decision Structures In the programs created thus far, Visual Basic reads and processes each of the procedure instructions in turn, one after the other. This is known as sequential processing or as the

More information

Programming with Visual Studio Higher (v. 2013)

Programming with Visual Studio Higher (v. 2013) Programming with Visual Studio Higher (v. 2013) Contents/Requirements Checklist Multiple selection: using ifs & case While Loops Using arrays Filling arrays Displaying array contents Types of variables:

More information

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1. 練習問題 1-1 Label1 Label1.Text = Label1.Text + 2 練習問題 1-2 Button2 Label1 Label1.Text = Label1.Text+ 2 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

More information

Interacting with External Applications

Interacting with External Applications Interacting with External Applications DLLs - dynamic linked libraries: Libraries of compiled procedures/functions that applications link to at run time DLL can be updated independently of apps using them

More information

LAMPIRAN LISTING PROGRAM

LAMPIRAN LISTING PROGRAM LAMPIRAN LISTING PROGRAM Imports System Imports System.IO Imports System.Math Public Class frmutama Dim dicari As DirectoryInfo Dim flpath As String, srcpath As String Dim asnode As Double, dsnode As Double,

More information

Else. End If End Sub End Class. PDF created with pdffactory trial version

Else. End If End Sub End Class. PDF created with pdffactory trial version Dim a, b, r, m As Single Randomize() a = Fix(Rnd() * 13) b = Fix(Rnd() * 13) Label1.Text = a Label3.Text = b TextBox1.Clear() TextBox1.Focus() Private Sub Button2_Click(ByVal sender As System.Object, ByVal

More information

Herefordshire College of Technology Centre Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3)

Herefordshire College of Technology Centre Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3) Student: Candidate Number: Assessor: Len Shand Herefordshire College of Technology Centre 24150 Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3) Course: Unit: Title:

More information

DEVELOPING OBJECT ORIENTED APPLICATIONS

DEVELOPING OBJECT ORIENTED APPLICATIONS DEVELOPING OBJECT ORIENTED APPLICATIONS By now, everybody should be comfortable using form controls, their properties, along with methods and events of the form class. In this unit, we discuss creating

More information

VISUAL BASIC SERVER INTERFACE CODE. Visual Basic 6 Graphical Interface 103. Visual Basic Module rtsscomm.bas Code.115

VISUAL BASIC SERVER INTERFACE CODE. Visual Basic 6 Graphical Interface 103. Visual Basic Module rtsscomm.bas Code.115 APPENDIX E VISUAL BASIC SERVER INTERFACE CODE Page E.1: E.2: E.3: E.4: E.5: Visual Basic 6 Graphical Interface 103 Visual Basic Form gyrofront.frm Code.....104 Visual Basic Module mydatatypes.bas Code..114

More information

DroidBasic Syntax Contents

DroidBasic Syntax Contents DroidBasic Syntax Contents DroidBasic Syntax...1 First Edition...3 Conventions Used In This Book / Way Of Writing...3 DroidBasic-Syntax...3 Variable...4 Declaration...4 Dim...4 Public...4 Private...4 Static...4

More information

(Subroutines in Visual Basic)

(Subroutines in Visual Basic) Ch 7 Procedures (Subroutines in Visual Basic) Visual Basic Procedures Structured Programs To simplify writing complex programs, most Programmers (Designers/Developers) choose to split the problem into

More information

Review. October 20, 2006

Review. October 20, 2006 Review October 20, 2006 1 A Gentle Introduction to Programming A Program (aka project, application, solution) At a very general level there are 3 steps to program development Determine output Determine

More information

Darshan Institute of Engineering & Technology for Diploma Studies

Darshan Institute of Engineering & Technology for Diploma Studies Dialog Box: There are many built-in dialog boxes to be used in Windows forms for various tasks like opening and saving files, printing a page, providing choices for colors, fonts, page setup, etc., to

More information

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Simple Calculator In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Let s get started First create a new Visual Basic

More information

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3)

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3) CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration MIS 15 Introduction to Business Programming Programming Assignment 3 (P3) Points: 50 Due Date: Tuesday, May 10 The purpose of

More information

VB FUNCTIONS AND OPERATORS

VB FUNCTIONS AND OPERATORS VB FUNCTIONS AND OPERATORS In der to compute inputs from users and generate results, we need to use various mathematical operats. In Visual Basic, other than the addition (+) and subtraction (-), the symbols

More information

Function: function procedures and sub procedures share the same characteristics, with

Function: function procedures and sub procedures share the same characteristics, with Function: function procedures and sub procedures share the same characteristics, with one important difference- function procedures return a value (e.g., give a value back) to the caller, whereas sub procedures

More information

Learning VB.Net. Tutorial 16 Modules

Learning VB.Net. Tutorial 16 Modules Learning VB.Net Tutorial 16 Modules Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

PROGRAMMING FUNDAMENTALS

PROGRAMMING FUNDAMENTALS PROGRAMMING FUNDAMENTALS Q1. Name any two Object Oriented Programming languages? Q2. Why is java called a platform independent language? Q3. Elaborate the java Compilation process. Q4. Why do we write

More information

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA

More information

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Polymorphism Objectives After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Definition Polymorphism provides the ability

More information

Unit 4 Advanced Features of VB.Net

Unit 4 Advanced Features of VB.Net Dialog Boxes There are many built-in dialog boxes to be used in Windows forms for various tasks like opening and saving files, printing a page, providing choices for colors, fonts, page setup, etc., to

More information

IOS Plus Trade - Web Services Version 4 Walkthrough

IOS Plus Trade - Web Services Version 4 Walkthrough IOS Plus Trade - Web Services Version 4 Walkthrough Visual Basic 2008 sample to retrieve IOS Plus Trade information The purpose of this walkthrough is to build the following Windows Forms Application that

More information

IRESS Depth - Web Services Version 4 Walkthrough Visual Basic 2008 sample to retrieve IRESS Depth information

IRESS Depth - Web Services Version 4 Walkthrough Visual Basic 2008 sample to retrieve IRESS Depth information IRESS Depth - Web Services Version 4 Walkthrough Visual Basic 2008 sample to retrieve IRESS Depth information The purpose of this walkthrough is to build the following Windows Forms Application that will

More information

Syntax. Table of Contents

Syntax. Table of Contents Syntax Table of Contents First Edition2 Conventions Used In This Book / Way Of Writing..2 KBasic-Syntax..3 Variable.4 Declaration4 Dim4 Public..4 Private.4 Protected.4 Static.4 As..4 Assignment4 User Defined

More information

1. Create your First VB.Net Program Hello World

1. Create your First VB.Net Program Hello World 1. Create your First VB.Net Program Hello World 1. Open Microsoft Visual Studio and start a new project by select File New Project. 2. Select Windows Forms Application and name it as HelloWorld. Copyright

More information

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version

More information

โปรแกรมช วยทดสอบหม อแปลงกระแส

โปรแกรมช วยทดสอบหม อแปลงกระแส โปรแกรมช วยทดสอบหม อแปลงกระแส 1.เมน ของโปรแกรม ภาพท 1 หน าเมน ของโปรแกรม Public Class frmmain Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

More information

CALCULATOR APPLICATION

CALCULATOR APPLICATION CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;

More information

Download the files from you will use these files to finish the following exercises.

Download the files from  you will use these files to finish the following exercises. Exercise 6 Download the files from http://www.peter-lo.com/teaching/x4-xt-cdp-0071-a/source6.zip, you will use these files to finish the following exercises. 1. This exercise will guide you how to create

More information

Upgrading Applications

Upgrading Applications C0561587x.fm Page 77 Thursday, November 15, 2001 2:37 PM Part II Upgrading Applications 5 Your First Upgrade 79 6 Common Tasks in Visual Basic.NET 101 7 Upgrading Wizard Ins and Outs 117 8 Errors, Warnings,

More information

...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb

...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb ...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb 1 1 Option Strict On 2 3 Public Class frmescape 4 5 ' Class variables. 6 7 Private _intonehour As Integer = 1 8 Private _inttwohour As Integer

More information

Repetition Structures

Repetition Structures Repetition Structures There are three main structures used in programming: sequential, decision and repetition structures. Sequential structures follow one line of code after another. Decision structures

More information

Lecture 10 OOP and VB.Net

Lecture 10 OOP and VB.Net Lecture 10 OOP and VB.Net Pillars of OOP Objects and Classes Encapsulation Inheritance Polymorphism Abstraction Classes A class is a template for an object. An object will have attributes and properties.

More information

Lab 4: Adding a Windows User-Interface

Lab 4: Adding a Windows User-Interface Lab 4: Adding a Windows User-Interface In this lab, you will cover the following topics: Creating a Form for use with Investment objects Writing event-handler code to interact with Investment objects Using

More information

EXAMGOOD QUESTION & ANSWER. Accurate study guides High passing rate! Exam Good provides update free of charge in one year!

EXAMGOOD QUESTION & ANSWER. Accurate study guides High passing rate! Exam Good provides update free of charge in one year! EXAMGOOD QUESTION & ANSWER Exam Good provides update free of charge in one year! Accurate study guides High passing rate! http://www.examgood.com Exam : 70-547(VB) Title : PRO:Design and Develop Web-Basd

More information

System Analysis and Design

System Analysis and Design System Analysis and Design LAB RECORD-INFS -280/L Information Systems Department University of Nizwa, Sultanate of Oman Table of Contents Task. No: Title Page Nos. Date 1) VB Text box and Message Button

More information

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485)

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485) 5 Pages VISUAL BASIC PROGRAMMING (44) Technical Task KEY Regional 2013 TOTAL POINTS (485) Graders: Please double-check and verify all scores! Property of Business Professionals of America. May be reproduced

More information

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants These notes are available on the IMS1906 Web site http://www.sims.monash.edu.au Tutorial Sheet 4/Week 5 Please

More information

Generics in VB.net. Generic Class: The following example shows a skeleton definition of a generic class.

Generics in VB.net. Generic Class: The following example shows a skeleton definition of a generic class. 1 Generics in VB.net A generic type is a single programming element that adapts to perform the same functionality for a variety of data types. When you define a generic class or procedure, you do not have

More information

7 Control Structures, Logical Statements

7 Control Structures, Logical Statements 7 Control Structures, Logical Statements 7.1 Logical Statements 1. Logical (true or false) statements comparing scalars or matrices can be evaluated in MATLAB. Two matrices of the same size may be compared,

More information

Lec 3. Compilers, Debugging, Hello World, and Variables

Lec 3. Compilers, Debugging, Hello World, and Variables Lec 3 Compilers, Debugging, Hello World, and Variables Announcements First book reading due tonight at midnight Complete 80% of all activities to get 100% HW1 due Saturday at midnight Lab hours posted

More information

Examples. Products. W informs Controls > Products > Navigation Bar > Examples. This topic provides how -to examples, grouped by features.

Examples. Products. W informs Controls > Products > Navigation Bar > Examples. This topic provides how -to examples, grouped by features. Examples 3564 W informs Controls > Products > Navigation Bar > Examples This topic provides how -to examples, grouped by features. Examples Layout How to: Create a NavBar Control in Code How to: Activate

More information

Santiago Canyon College Computer Science

Santiago Canyon College Computer Science P a g e 1 Santiago Canyon College Computer Science The.Net Threading Model Introduction The purpose of this paper is to introduce you to multi-threading in Visual Studio. Learning how to take advantage

More information

Visual Basic 2008 The programming part

Visual Basic 2008 The programming part Visual Basic 2008 The programming part Code Computer applications are built by giving instructions to the computer. In programming, the instructions are called statements, and all of the statements that

More information

Lab 3 The High-Low Game

Lab 3 The High-Low Game Lab 3 The High-Low Game LAB GOALS To develop a simple windows-based game named High-Low using VB.Net. You will use: Buttons, Textboxes, Labels, Dim, integer, arithmetic operations, conditionals [if-then-else],

More information

Updated: Saturday, November 29, 2014 Page 1

Updated: Saturday, November 29, 2014 Page 1 ' Copyright 2013 Safe T Services - All Rights Reserved '=========================================================================================== 'Changed by Change Date Change Tag ' Description of Change

More information

Learning VB.Net. Tutorial 10 Collections

Learning VB.Net. Tutorial 10 Collections Learning VB.Net Tutorial 10 Collections Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.

More information

Private Sub Cours_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Private Sub Cours_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Public Class Cours Private nc As Integer Private Sub Cours_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO : cette ligne de code charge les données dans la table

More information

C16 Visual Basic Net Programming

C16 Visual Basic Net Programming C16 Visual Basic Net Programming Student ID Student Name Date - Module Tutor - 1 P a g e Report Contents Introduction... 2 Software Development Process... 3 Self Reflection... 6 References... 6 Appendices...

More information

Visual Studio.NET for AutoCAD Programmers

Visual Studio.NET for AutoCAD Programmers December 2-5, 2003 MGM Grand Hotel Las Vegas Visual Studio.NET for AutoCAD Programmers Speaker Name: Andrew G. Roe, P.E. Class Code: CP32-3 Class Description: In this class, we'll introduce the Visual

More information

Section 7 The BASIC Language II

Section 7 The BASIC Language II Dates Section 7 The BASIC Language II The Date class holds a date (between January 1 st, 0001 and December 31 st, 9999) combined with a time (between 0:00:00 and 23:59:59) Constructors of the Date class

More information

Mr.Khaled Anwar ( )

Mr.Khaled Anwar ( ) The Rnd() function generates random numbers. Every time Rnd() is executed, it returns a different random fraction (greater than or equal to 0 and less than 1). If you end execution and run the program

More information

3. Can every Do-Loop loop be written as a For-Next loop? Why or why not? 4. Name two types of files that can be opened and used in a VB program.

3. Can every Do-Loop loop be written as a For-Next loop? Why or why not? 4. Name two types of files that can be opened and used in a VB program. CE 311 K Fall 005 Second Exam - Examples Answers at the bottom. 1. What are two categories of flow control structures?. Name three logical operators in Visual Basic (VB). 3. Can every Do-Loop loop be written

More information

BackgroundWorker Component Overview 1 Multithreading with the BackgroundWorker Component 3 Walkthrough Running an Operation in the Background 10 How

BackgroundWorker Component Overview 1 Multithreading with the BackgroundWorker Component 3 Walkthrough Running an Operation in the Background 10 How BackgroundWorker Component Overview 1 Multithreading with the BackgroundWorker Component 3 Walkthrough Running an Operation in the Background 10 How to Download a File in the Background 15 How to Implement

More information

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type >

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type > VBA Handout References, tutorials, books Excel and VBA tutorials Excel VBA Made Easy (Book) Excel 2013 Power Programming with VBA (online library reference) VBA for Modelers (Book on Amazon) Code basics

More information

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions 5-menus.htm; updated September 12, 2011 Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions Coverage: This chapter covers several important topics: (1) use of menus and context

More information

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS Intended Learning Objectives Able to build a simple Visual Basic Application. 2 The Sub Statement Private Sub ControlName_eventName(ByVal sender As System.Object,

More information

"!#... )*! "!# )+, -./ 01 $

!#... )*! !# )+, -./ 01 $ Email engauday@hotmail.com! "!#... $ %&'... )*! "!# )+, -./ 01 $ ) 1+ 2#3./ 01 %.. 7# 89 ; )! 5/< 3! = ;, >! 5 6/.?

More information

Lab 6: Making a program persistent

Lab 6: Making a program persistent Lab 6: Making a program persistent In this lab, you will cover the following topics: Using the windows registry to make parts of the user interface sticky Using serialization to save application data in

More information

MapWindow Plug-in Development

MapWindow Plug-in Development MapWindow Plug-in Development Sample Project: Simple Path Analyzer Plug-in A step-by-step guide to creating a custom MapWindow Plug-in using the IPlugin interface by Allen Anselmo shade@turbonet.com Introduction

More information

Learning VB.Net. Tutorial 17 Classes

Learning VB.Net. Tutorial 17 Classes Learning VB.Net Tutorial 17 Classes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

I101/B100 Problem Solving with Computers

I101/B100 Problem Solving with Computers I101/B100 Problem Solving with Computers By: Dr. Hossein Hakimzadeh Computer Science and Informatics IU South Bend 1 What is Visual Basic.Net Visual Basic.Net is the latest reincarnation of Basic language.

More information

Before We Begin. Introduction to Computer Use II. Overview (1): Winter 2006 (Section M) CSE 1530 Winter Bill Kapralos.

Before We Begin. Introduction to Computer Use II. Overview (1): Winter 2006 (Section M) CSE 1530 Winter Bill Kapralos. Winter 2006 (Section M) Topic E: Subprograms Functions and Procedures Wednesday, March 8 2006 CSE 1530, Winter 2006, Overview (1): Before We Begin Some administrative details Some questions to consider

More information

PROGRAMMING ASSIGNMENT: MOVIE QUIZ

PROGRAMMING ASSIGNMENT: MOVIE QUIZ PROGRAMMING ASSIGNMENT: MOVIE QUIZ For this assignment you will be responsible for creating a Movie Quiz application that tests the user s of movies. Your program will require two arrays: one that stores

More information

Visual Basic/C# Programming (330)

Visual Basic/C# Programming (330) Page 1 of 16 Visual Basic/C# Programming (330) REGIONAL 2016 Program: Character Stats (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores and answer keys! Property

More information

NOTES: Procedures (module 15)

NOTES: Procedures (module 15) Computer Science 110 NAME: NOTES: Procedures (module 15) Introduction to Procedures When you use a top-down, structured program design, you take a problem, analyze it to determine what the outcome should

More information

The New Brew-CQ Synchronous Sockets and Threading

The New Brew-CQ Synchronous Sockets and Threading The New Brew-CQ Synchronous Sockets and Threading Server Topology: The Brew-CQ server is an application written in the new.net compilers from Microsoft. The language of choice is Visual Basic. The purpose

More information

UNIT 5: DISCRETE FOURIER TRANSFORM

UNIT 5: DISCRETE FOURIER TRANSFORM UNIT 5: DISCRETE FOURIER TRANSFORM 5.1 Introduction This unit introduces the Discrete Fourier Transform as a means for obtaining a frequency based representation of a digital signal. The special characteristics

More information

Using KE IMu's.Net API

Using KE IMu's.Net API IMu Documentation Using KE IMu's.Net API Document Version 2 EMu Version 4.0 IMu Version 1.0.03 www.kesoftware.com 2011 KE Software. All rights reserved. Contents SECTION 1 Introduction 1 Documenting data

More information

MIS 216 SPRING 2018 PROJECT 4

MIS 216 SPRING 2018 PROJECT 4 MIS 216 SPRING 2018 PROJECT 4 Subs / Functions Arrays / Classes 1. Start a new project a. Create a folder on your desktop name it yourinitialsproject3 as in tnjproject3. b. FILE NEW PROJECT c. Change the

More information

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date :

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : Form Adapter Example DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : 2009-06-19 Form_Adapter.doc DRAFT page 1 Table of Contents Creating Form_Adapter.vb... 2 Adding the

More information

11. Persistence. The use of files, streams and serialization for storing object model data

11. Persistence. The use of files, streams and serialization for storing object model data 11. Persistence The use of files, streams and serialization for storing object model data Storing Application Data Without some way of storing data off-line computers would be virtually unusable imagine

More information

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara LAMPIRAN 1. Modul Imports System.Data Imports System.Data.OleDb Module Module1 Public conn As OleDbConnection Public CMD As OleDbCommand Public DS As New DataSet Public DA As OleDbDataAdapter Public RD

More information

Private Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub

Private Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub LISTING PROGRAM Menu_Utama.vb Public Class FrmUtama Private Sub DataMovieToolStripMenuItem_Click(ByVal sender As DataMovieToolStripMenuItem.Click FrmMovie.ShowDialog() Private Sub DataPeminjamToolStripMenuItem_Click(ByVal

More information

DAFTAR PUSTAKA. Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England

DAFTAR PUSTAKA. Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England DAFTAR PUSTAKA Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England Elib.unikom.ac.id, SQL Server, 27 April 2014. Jogiyanto. 2005. Analisis & Desain Sistem Informasi : Pendekatan

More information

C:\EDIdEv\Examples\HIPAA\5010\VbNet\vbNet_Tran834X220A1\Form1.vb Imports Edidev.FrameworkEDI

C:\EDIdEv\Examples\HIPAA\5010\VbNet\vbNet_Tran834X220A1\Form1.vb Imports Edidev.FrameworkEDI Imports Edidev.FrameworkEDI 1 Public Class Form1 Private Sub btntranslate_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles btntranslate.click Dim oedidoc As edidocument Dim oschemas

More information

Fast Food Store Group Boxes and Other User Controls

Fast Food Store Group Boxes and Other User Controls VISUAL BASIC Fast Food Store Group Boxes and Other User Controls Copyright 2014 Dan McElroy Sample Program Execution The customer receipt is updated each time another selection is made and the Enter button

More information

Hands-On Lab. Lab Manual HOLDEV083 Advanced Language Features in Visual Basic

Hands-On Lab. Lab Manual HOLDEV083 Advanced Language Features in Visual Basic Hands-On Lab Lab Manual HOLDEV083 Advanced Language Features in Visual Basic Please do not remove this manual from the lab The lab manual will be available from CommNet Release Date: May 2005 m Information

More information

PASSTCERT QUESTION & ANSWER

PASSTCERT QUESTION & ANSWER PASSTCERT QUESTION & ANSWER Higher Quality Better Service! Weofferfreeupdateserviceforoneyear HTTP://WWW.PASSTCERT.COM Exam : 070-540VB Title : TS: MS.NET Frmewk 3.5, Workflow Foundation App Dev Version

More information

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init Option Strict On Imports System.Drawing.Imaging Imports System.Drawing Imports System Imports System.Collections Imports System.Configuration Imports System.Data Imports System.IO Imports System.Web Imports

More information

MATFOR In Visual Basic

MATFOR In Visual Basic Quick Start t t MATFOR In Visual Basic ANCAD INCORPORATED TEL: +886(2) 8923-5411 FAX: +886(2) 2928-9364 support@ancad.com www.ancad.com 2 MATFOR QUICK START Information in this instruction manual is subject

More information

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX KillTest Q&A Exam : 70-504 Title : TS: Microsoft.NET Framework 3.5 -C Windows Workflow Foundation Version : DEMO 1 / 20 1. You are writing a sequential console workflow that consists of a delay activity

More information

PI Event Frames for Corrosion Coupon Data. By: Randy Esposito & Rick Davin Nalco Energy Services Automation Center of Excellence

PI Event Frames for Corrosion Coupon Data. By: Randy Esposito & Rick Davin Nalco Energy Services Automation Center of Excellence PI Event Frames for Corrosion Coupon Data By: Randy Esposito & Rick Davin Nalco Energy Services Automation Center of Excellence Agenda Who is Nalco, what do we do What is a Corrosion Coupon and why do

More information

Real4Test. Real IT Certification Exam Study materials/braindumps

Real4Test.  Real IT Certification Exam Study materials/braindumps Real4Test Real IT Certification Exam Study materials/braindumps Exam : 70-504 Title : TS: Microsoft.NET Framework 3.5 - C Windows Workflow Foundation Vendors : Microsoft Version : DEMO Get Latest & Valid

More information