0% found this document useful (0 votes)
22 views4 pages

Luthfi Zaidi (2213000056) - Tugas P9-P11

The document contains programming assignments for a student named Luthfi Zaidi, focusing on Human-Computer Interaction. It includes code snippets for calculating areas of geometric shapes, displaying biodata, and managing food and drink prices in a simple application. Each section corresponds to different class meetings with specific functionalities implemented in Visual Basic.

Uploaded by

diahayuushe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Luthfi Zaidi (2213000056) - Tugas P9-P11

The document contains programming assignments for a student named Luthfi Zaidi, focusing on Human-Computer Interaction. It includes code snippets for calculating areas of geometric shapes, displaying biodata, and managing food and drink prices in a simple application. Each section corresponds to different class meetings with specific functionalities implemented in Visual Basic.

Uploaded by

diahayuushe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Tugas 1

Nama : Luthfi Zaidi


Kelas : A Siang
Prodi : Sistem Informasi – S1
Dosen :
Matkul : Interaksi Manusia dan Komputer

1. Pertemuan 9
Ini merupakan program perhitungan luas segitiga, persegi panjang dan luas lingkaran

Public Class Form1


Private Sub btnHitung_Click(sender As Object, e As EventArgs) Handles btnHitung.Click
txtLuas.Text = 0.5 * Val(txtAlas.Text) * Val(txtTinggi.Text)
End Sub

Private Sub btnKeluar_Click(sender As Object, e As EventArgs) Handles btnKeluar.Click


End
End Sub
Private Sub btnKira_Click(sender As Object, e As EventArgs) Handles btnKira.Click
Dim panjang As Double = Convert.ToDouble(txtPanjang.Text)
Dim lebar As Double = Convert.ToDouble(txtLebar.Text)
Dim luas As Double = panjang * lebar

txtHasil.Text = luas.ToString()
End Sub

Private Sub btnHapus_Click(sender As Object, e As EventArgs) Handles btnHapus.Click


End
End Sub

Private Sub txtJadi_Click(sender As Object, e As EventArgs) Handles txtJadi.Click


Dim jarijari As Double = Convert.ToDouble(txtJariJari.Text)
Dim Phi As Double = 3.14 'Convert.ToDouble(txtPhi.Text)'
Dim luas As Double = Phi * Math.Pow(jarijari, 2)
txtHitung.Text = luas.ToString()
End Sub

Private Sub txtGagal_Click(sender As Object, e As EventArgs) Handles txtGagal.Click


End
End Sub
End Class

2. Pertemuan 10
Ini adalah program menampilkan biodata

Public Class Form1


Sub pesan()
Dim nama As String
Dim alamat As String
Dim tanggal As String
Dim tempat As String
Dim hobi As String

nama = txtNama.Text
alamat = txtAlamat.Text
tanggal = txtTanggal.Text
tempat = txtTempat.Text
hobi = txtHobi.Text

Label7.Text = "Terimakasih" & Environment.NewLine &


"Nama anda: " & nama & Environment.NewLine &
"Alamat: " & alamat & Environment.NewLine &
"Tanggal: " & tanggal & Environment.NewLine &
"Tempat: " & tempat & Environment.NewLine &
"Hobi: " & hobi
End Sub
Sub kosong()
txtNama.Text = ""
txtAlamat.Text = ""
txtTanggal.Text = ""
txtTempat.Text = ""
txtHobi.Text = ""
Label7.Text = ""
End Sub

Private Sub btnSimpan_Click(sender As Object, e As EventArgs) Handles btnSimpan.Click


Call pesan()
End Sub
Private Sub btnHapus_Click(sender As Object, e As EventArgs) Handles btnHapus.Click
Call kosong()
End Sub

Private Sub btnKeluar_Click(sender As Object, e As EventArgs) Handles btnKeluar.Click


End
End Sub
End Class

3. Pertemuan 11

Public Class Form1


Private Sub c1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
c1.CheckedChanged
If c1.Checked = True Then
txtHargaMakanan.Text = "5000"
Else
txtHargaMakanan.Text = ""
End If
End Sub

Private Sub c2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c2.CheckedChanged
If c2.Checked = True Then
txtHargaMakanan.Text = "4000"
Else
txtHargaMakanan.Text = ""
End If
End Sub

Private Sub c3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c3.CheckedChanged
If c3.Checked = True Then
txtHargaMakanan.Text = "6000"
Else
txtHargaMakanan.Text = ""
End If
End Sub

Private Sub c4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c4.CheckedChanged
If c4.Checked = True Then
txtHargaMakanan.Text = "8000"
Else
txtHargaMakanan.Text = ""
End If
End Sub

Private Sub c5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c5.CheckedChanged
If c5.Checked = True Then
txtHargaMinuman.Text = "2000"
Else
txtHargaMinuman.Text = ""
End If
End Sub

Private Sub c6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c6.CheckedChanged
If c6.Checked = True Then
txtHargaMinuman.Text = "5000"
Else
txtHargaMinuman.Text = ""
End If
End Sub

Private Sub c7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c7.CheckedChanged
If c7.Checked = True Then
txtHargaMinuman.Text = "3000"
Else
txtHargaMinuman.Text = ""
End If
End Sub

Private Sub c8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


c8.CheckedChanged
If c8.Checked = True Then
txtHargaMinuman.Text = "7000"
Else
txtHargaMinuman.Text = ""
End If
End Sub

Private Sub bJalankan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


bJalankan.Click
txtTotal.Text = (Val(txtHargaMakanan.Text) * (Val(txtJumlah1.Text)) + (Val(txtHargaMinuman.Text) *
Val(txtJumlah2.Text)))
End Sub

Private Sub bHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


bHapus.Click
txtHargaMakanan.Text = ""
txtHargaMinuman.Text = ""
txtJumlah1.Text = ""
txtJumlah2.Text = ""
txtTotal.Text = ""
End Sub
End Class

You might also like