0% found this document useful (0 votes)
17 views5 pages

Tugas Aplikasi Dan Program Komputer: Muhajir Sadikin 03021181520138

This document describes a program for a restaurant menu application with 3 forms. Form 1 is for breakfast menu, Form 2 is for lunch menu, and Form 3 is for dinner menu. Each form allows the user to select a food item from a dropdown, which updates the price textbox. It also allows selecting a drink and calculates the total price. The coding uses If/Else statements to update the prices based on the user's selections. Clicking buttons navigates between the different forms.

Uploaded by

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

Tugas Aplikasi Dan Program Komputer: Muhajir Sadikin 03021181520138

This document describes a program for a restaurant menu application with 3 forms. Form 1 is for breakfast menu, Form 2 is for lunch menu, and Form 3 is for dinner menu. Each form allows the user to select a food item from a dropdown, which updates the price textbox. It also allows selecting a drink and calculates the total price. The coding uses If/Else statements to update the prices based on the user's selections. Clicking buttons navigates between the different forms.

Uploaded by

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

TUGAS APLIKASI DAN PROGRAM KOMPUTER

Diusulkan untuk memenuhi tugas Mata Kuliah Aplikasi dan Program


Komputer

Oleh:

Muhajir Sadikin 03021181520138

UNIVERSITAS SRIWIJAYA
INDRALAYA
2017
1. Membuat Form 1 (Menu Sarapan) sesuai form di bawah ini :

Adapun Coding yang digunakan dalam membuat form 1 adalah


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)
Me.Hide()
Form2.Show()
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "Nasi Uduk" Then
TextBox1.Text = "5000"
ElseIf ComboBox1.SelectedItem = "Bubur Ayam" Then
TextBox1.Text = "10000"
ElseIf ComboBox1.SelectedItem = "Gorengan" Then
TextBox1.Text = "1000/buah"
ElseIf ComboBox1.SelectedItem = "Nasi Goreng" Then
TextBox1.Text = "12000"
End If
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
If ComboBox2.SelectedItem = "Teh Hangat" Then
TextBox2.Text = "3000"
ElseIf ComboBox2.SelectedItem = "Kopi Susu" Then
TextBox2.Text = "5000"
ElseIf ComboBox2.SelectedItem = "Susu" Then
TextBox2.Text = "5000"
End If
End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End Sub

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Me.Hide()
Form2.Show()
End Sub
End Class

2. Membuat Form 2 (Menu Makan Siang) seperti dibawah ini :

Adapun Coding yang digunakan dalam membuat form 2 adalah :


Public Class Form2

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
If ComboBox2.SelectedItem = "Es Teh" Then
TextBox2.Text = "4000"
ElseIf ComboBox2.SelectedItem = "Es Susu" Then
TextBox2.Text = "4000"
ElseIf ComboBox2.SelectedItem = "Es Jeruk" Then
TextBox2.Text = "5000"
ElseIf ComboBox2.SelectedItem = "Jus Apel" Then
TextBox2.Text = "7000"
ElseIf ComboBox2.SelectedItem = "Jus Alpokat" Then
TextBox2.Text = "7000"
ElseIf ComboBox2.SelectedItem = "Jus Pepaya" Then
TextBox2.Text = "7000"
End If
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "Nasi Ayam Geprek" Then
TextBox1.Text = "12000"
ElseIf ComboBox1.SelectedItem = "Nasi Ayam Bakar" Then
TextBox1.Text = "15000"
ElseIf ComboBox1.SelectedItem = "Coto Makassar" Then
TextBox1.Text = "17000"
ElseIf ComboBox1.SelectedItem = "Nasu Syukka" Then
TextBox1.Text = "15000"
ElseIf ComboBox1.SelectedItem = "Nasi Ayam Kecap" Then
TextBox1.Text = "12000"
ElseIf ComboBox1.SelectedItem = "Nasi Ikan" Then
TextBox1.Text = "12000"
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Me.Hide()
Form3.Show()
End Sub
End Class

3. Membuat Form 3 (Menu Makan Malam) seperti gambar dibawah ini:


Adapun coding yang digunakan dalam membuat Form 3 adalah
Public Class Form3

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
If ComboBox2.SelectedItem = "Es Teh" Then
TextBox2.Text = "4000"
ElseIf ComboBox2.SelectedItem = "Es Susu" Then
TextBox2.Text = "4000"
ElseIf ComboBox2.SelectedItem = "Es Jeruk" Then
TextBox2.Text = "5000"
ElseIf ComboBox2.SelectedItem = "Jus Apel" Then
TextBox2.Text = "7000"
ElseIf ComboBox2.SelectedItem = "Jus Alpokat" Then
TextBox2.Text = "7000"
ElseIf ComboBox2.SelectedItem = "Jus Pepaya" Then
TextBox2.Text = "7000"
End If
End Sub

Private Sub ComboBox1_SelectedIndexChanged_1(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "Nasi Ayam Geprek" Then
TextBox1.Text = "12000"
ElseIf ComboBox1.SelectedItem = "Nasi Ayam Bakar" Then
TextBox1.Text = "15000"
ElseIf ComboBox1.SelectedItem = "Coto Makassar" Then
TextBox1.Text = "17000"
ElseIf ComboBox1.SelectedItem = "Nasu Syukka" Then
TextBox1.Text = "15000"
ElseIf ComboBox1.SelectedItem = "Nasi Ayam Kecap" Then
TextBox1.Text = "12000"
ElseIf ComboBox1.SelectedItem = "Nasi Ikan" Then
TextBox1.Text = "12000"
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Form2.Show()
Me.Hide()
End Sub
End Class

You might also like