Konsep
Program Tambahan
1. Deskripsi
Program yang kami
buat ini adalah program yang dibuat dengan peraturan menebak harga dengan ada 2
variable yang harus kita tebak nama jenisya dan harganya
2. Tujuan dan
Manfaat
Tujuan dari program
ini adalah untuk melatih daya piker kita terutama dengan perbandingan dan
program linier
3. Sasaran
Sasaran dari program ini adalah
untuk pelajar SMP yang diaplikasi dalam bentuk virtual yang lebih mudah dan
menarik untuk digunakan.
Langkah awal adalah buka dahulu
Visual Basic 2010 :
Form1 :
Komponen
Toolbox yang digunakan sebagai berikut :
| 
No. | 
Komponen | 
Properties | 
Keterangan | 
| 
1 | 
Form1 | 
Name 
Text 
Display | 
Form1 
Form Login 
CentertoScreen | 
| 
2 | 
Label1 | 
Name 
Text 
TextAlign 
Font | 
Label1 
Game Tebak Harga 
TopCenter 
Wide
  Latin, 18 pt | 
| 
3 | 
Label2 | 
Name 
Text 
TextAlign 
Font | 
Label2 
Seru dan Bermanfaat 
TopCenter 
Modern
  No. 20, 16 pt | 
| 
4 | 
Label3 | 
Name 
Text 
TextAlign 
Font | 
Label3 
Nb : Siapkan kertas dan Alat Tulis 
TopCenter 
Microsoft
  Sans Serif, 8 pt | 
| 
5 | 
Label4 | 
Name 
Text 
TextAlign 
Font | 
Label4 
Online 
TopCenter 
Broadway,
  16 pt | 
| 
6 | 
Button1 | 
Name | 
Button1 | 
| 
Text | 
Mulai | ||
| 
7 | 
Button2 | 
Name | 
Button2 | 
| 
Text | 
Keluar | 
Listingnya
:
Public Class Form1
   
Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
        Me.CenterToScreen()
   
End Sub
   
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
        Me.Hide()
        Form2.Show()
   
End Sub
   
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
        Close()
   
End Sub
End Class
Form2 :
Komponen
Toolbox yang digunakan sebagai berikut :
| 
No. | 
Komponen | 
Properties | 
Keterangan | 
| 
1 | 
Form2 | 
Name 
Text 
Display | 
Form2 
CentertoScreen | 
| 
2 | 
Label1 | 
Name 
Text 
TextAlign 
Font | 
Label1 
Welcome to 
TopLeft 
Modern
  No. 20, 20 pt | 
| 
3 | 
Label2 | 
Name 
Text 
TextAlign 
Font | 
Label2 
GAME TEBAK HARGA ONLINE  
TopCenter 
Stencil,
  20 pt | 
| 
4 | 
Label3 | 
Name 
Text 
Font | 
Label3 
2x + 3y =390.000 
Microsoft
  Sans Serif, 14 pt | 
| 
5 | 
Label4 | 
Name 
Text 
Font | 
Label4 
Tebak harga 
Microsoft
  Sans Serif, 8 pt | 
| 
6 | 
Label5 | 
Name 
Text 
Font | 
Label5 
harga 
Microsoft
  Sans Serif, 8 pt | 
| 
7 | 
Label6 | 
Name 
Text 
Font | 
Label6 
harga 
Microsoft
  Sans Serif, 8 pt | 
| 
8 | 
Label7 | 
Name 
Text 
Font | 
Label7 
= 
Microsoft
  Sans Serif, 9 pt | 
| 
9 | 
Label8 | 
Name 
Text 
Font | 
Label8 
  x  +  y
  =150.000 
Microsoft
  Sans Serif, 14 pt | 
| 
10 | 
Label9 | 
Name 
Text 
Font | 
Label9 
X= 
Microsoft
  Sans Serif, 8 pt | 
| 
11 | 
Label10 | 
Name 
Text 
Font | 
Label10 
Y= 
Microsoft
  Sans Serif, 8 pt | 
| 
12 | 
Label11 | 
Name 
Text 
Font | 
Label11 
harga 
Microsoft
  Sans Serif, 8 pt | 
| 
13 | 
Label12 | 
Name 
Text 
Font | 
Label12 
harga 
Microsoft
  Sans Serif, 8 pt | 
| 
13 | 
Label13 | 
Name 
Text 
Font | 
Label13 
Jumlah meja 
Microsoft
  Sans Serif, 8 pt | 
| 
14 | 
Button1 | 
Name | 
Button1 | 
| 
Text | 
Tes | ||
| 
15 | 
Button2 | 
Name | 
Button2 | 
| 
Text | 
Tes | ||
| 
16 | 
Button3 | 
Name | 
Button3 | 
| 
Text | 
Hitung | ||
| 
17 | 
Button4 | 
Name | 
Button4 | 
| 
Text | 
Reset | ||
| 
18 | 
Button5 | 
Name | 
Button5 | 
| 
Text | 
Keluar | ||
| 
19 | 
Combobox1 | 
Name | 
Combobox1 | 
| 
Item | 
Meja,
  Kursi | ||
| 
20 | 
Combobox2 | 
Name | 
Combobox2 | 
| 
Item | 
<,
  >, = | ||
| 
21 | 
Combobox3 | 
Name | 
Combobox3 | 
| 
Item | 
Kursi | ||
| 
22 | 
Combobox4 | 
Name | 
Combobox4 | 
| 
Item | 
Meja,
  Kursi | ||
| 
23 | 
Combobox5 | 
Name | 
Combobox5 | 
| 
Item | 
Meja,
  Kursi | ||
| 
24 | 
Listbox1 | 
Name | 
Listbox1 | 
| 
25 | 
Textbox1 | 
Name | 
Textbox1 | 
| 
Text |  | ||
| 
Font | 
Microsoft
  sans Serif,8 pt | ||
| 
26 | 
Textbox2 | 
Name | 
Textbox2 | 
| 
Text |  | ||
| 
Font | 
Microsoft
  sans Serif,8 pt | ||
| 
27 | 
Textbox3 | 
Name | 
Textbox1 | 
| 
Text |  | ||
| 
Font | 
Microsoft
  sans Serif,8 pt | ||
| 
28 | 
Textbox4 | 
Name | 
Textbox1 | 
| 
Text |  | ||
| 
Font | 
Microsoft
  sans Serif,8 pt | 
Listingnya
:
Public Class Form2
   
Private Sub
Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
        Me.CenterToScreen()
   
End Sub
(Membuat
display tampil ditengah)
   
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
        If
ComboBox2.Text = "<" Then
            TextBox3.Text = "False"
        ElseIf
ComboBox2.Text = ">" Then
            TextBox3.Text = "True"
        ElseIf
ComboBox2.Text = "=" Then
            TextBox3.Text = "False"
        End If
   
End Sub
(Membuat
Perbandingan antara meja dan kursi dan mengeluarkan output nilainnya)
   
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
        If
ComboBox1.Text = "Kursi" And Val(TextBox1.Text) = "60000"
And ComboBox5.Text = "Meja"
And Val(TextBox2.Text) = "90000" Then
            MsgBox("Tebakan
Anda Benar!", 0, "Selamat")
            Label13.Visible = True
            TextBox4.Visible = True
            ListBox1.Visible = True
            Button3.Visible = True
            Button4.Visible = True
        Else
            MsgBox("Tebakan
Anda Salah", 0, "Peringatan")
        End If
   
End Sub
(Membuat
kondisi dimana variable X nya harus diisi dengan nama kusi dengan harga 60000 dan
Y nya harus diisi dengan nama meja dan dengan harga 90000)
   
Private Sub
Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
        For x =
1 To Int(TextBox4.Text)
            ListBox1.Items.Add("Harga " & x & " Meja adalah " & x *
Val(TextBox2.Text))
        Next
   
End Sub
(Membuat
Operator perualangan harga meja dengan menginputkan jumlah yang kita inginkan)
   
Private Sub
Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button4.Click
        TextBox4.Text = ""
        ListBox1.Items.Clear()
   
End Sub
(Membuat
reset operator perulangan)
   
Private Sub
Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button5.Click
        Close()
   
End Sub
(Membuat
Program Keluar)
End Class








 
 
 
 
