This document contains code for a Visual Basic program that allows a user to order food and drinks. The user inputs the quantities of different items and clicks an order button, which calculates the total price. The user then inputs the amount paid and the program calculates change returned. The program displays messages if insufficient funds are provided or returns the user to the menu screen. It was created by four students for a class project.
This document contains code for a Visual Basic program that allows a user to order food and drinks. The user inputs the quantities of different items and clicks an order button, which calculates the total price. The user then inputs the amount paid and the program calculates change returned. The program displays messages if insufficient funds are provided or returns the user to the menu screen. It was created by four students for a class project.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
This document contains code for a Visual Basic program that allows a user to order food and drinks. The user inputs the quantities of different items and clicks an order button, which calculates the total price. The user then inputs the amount paid and the program calculates change returned. The program displays messages if insufficient funds are provided or returns the user to the menu screen. It was created by four students for a class project.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click End End Sub End Class CODE FORM2 Public Class Form2 Dim total, bayar, kembali As Single Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click total = Val(TextBox1.Text) bayar = Val(TextBox2.Text)
kembali = bayar - total
TextBox3.Text = kembali If kembali < 0 Then MessageBox.Show(" Uangnya Kurang Mas Brooo...!", "Bayar", MessageBoxButtons.OK) TextBox2.Focus()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
TextBox2.Text = "" TextBox3.Text = "" TextBox2.Focus() End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click Me.Hide() Form1.Show() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click End End Sub
End Class
Cara Kerja Program
1. Masukkan jumlah makanan dan minuman yang anda akan pesan.
2. Lalu klik order untuk memesan 3. Akan keluar tampilan harga yang harus anda bayar 4. Masukkan jumlah uang pada kotak pay - Jika uang yang anda masukkan lebih, maka kotak change akan berisikan kembalian yang anda terima. - Jika uang yang anda masukkan kurang, akan keluar tampilan peringatan message box. 5. Jika anda ingin melihat menu kembali, klik tombol “back to menu”. 6. Jika anda ingin keluar dari menu, klik tombol exit. 7. Jika uang anda kurang, klik tombol clear, lalu masukkan uang sesuai jumlah harga yang anda pesan.
Steve Graham, Doug Davis, Simeon Simeonov, Glen Daniels, Peter Brittenham, Yuichi Nakamura, Paul Fremantle, Dieter Koenig, Claudia Zentner-Building Web Services With Java_ Making Sense of XML, SOAP, W