1 / 9

題目 : 夜店包廂計費系統 班級 : 車輛一乙 學號 : 4A115038 姓名 : 方靖騰 老師 : 謝慶存

計算機程式及實習期末報告. 題目 : 夜店包廂計費系統 班級 : 車輛一乙 學號 : 4A115038 姓名 : 方靖騰 老師 : 謝慶存. 夜店包廂計費系統. 學習重點 ListBox 、 RadioButton 、 CheckBox 的使用方法。. 程式說明 :. 把需要的包廂數量輸入 在選擇是否要開酒 在按下計算金額即可 11 點前入場 95 折 大學生之夜 9 折 周年慶 8 折. 使用說明 :. 版面設計 :. 程式碼設計 :. Public Class Form1

Download Presentation

題目 : 夜店包廂計費系統 班級 : 車輛一乙 學號 : 4A115038 姓名 : 方靖騰 老師 : 謝慶存

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 計算機程式及實習期末報告 題目 : 夜店包廂計費系統班級 : 車輛一乙學號 :4A115038姓名 : 方靖騰老師 : 謝慶存

  2. 夜店包廂計費系統 • 學習重點 • ListBox、RadioButton 、 CheckBox 的使用方法。

  3. 程式說明 : • 把需要的包廂數量輸入 在選擇是否要開酒 在按下計算金額即可 11點前入場 95折 大學生之夜 9折 周年慶 8折

  4. 使用說明 :

  5. 版面設計 :

  6. 程式碼設計 : • Public Class Form1 • Dim total, accTotal As Integer • Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load • Label7.Text = "$" & total & "元﹐" • Label8.Text = “累計:G$" & accTotal & "元﹐" • Label7.Font = New Font(“標楷體", 24) • Label7.ForeColor = Color.Red • total = 0 • accTotal = 0 • End Sub

  7. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click • total = Val(TBoxPrice1.Text) * Val(TBoxQty1.Text) + Val(TBoxPrice2.Text) * Val(TBoxQty2.Text) + Val(TBoxPrice3.Text) * Val(TBoxQty3.Text) • Dim total1, total2, total3 As Integer • If CheckBox1.Checked Then total1 = (Val(TBoxPrice1.Text) + 150) * Val(TBoxQty1.Text) • If CheckBox2.Checked Then total2 = (Val(TBoxPrice2.Text) + 150) * Val(TBoxQty2.Text) • If CheckBox3.Checked Then total3 = (Val(TBoxPrice3.Text) + 150) * Val(TBoxQty3.Text) • If CheckBox1.Checked = False Then total1 = (Val(TBoxPrice1.Text)) * Val(TBoxQty1.Text) • If CheckBox2.Checked = False Then total2 = (Val(TBoxPrice2.Text)) * Val(TBoxQty2.Text) • If CheckBox3.Checked = False Then total3 = (Val(TBoxPrice3.Text)) * Val(TBoxQty3.Text) • total = total1 + total2 + total3 • If RadioButton1.Checked = True Then total = total * 0.95 • If RadioButton2.Checked = True Then total = total * 0.9 • If RadioButton3.Checked = True Then total = total * 0.8 • Label7.Text = "$" & total & "元﹐" • accTotal = accTotal + total • Label8.Text = “累計:$" & accTotal & "元﹐" • ListBox1.Items.Add(total & “-->” & “圓桌小包廂” & TBoxPrice1.Text & “*” & TBoxQty1.Text & “+” & “中包廂” & TBoxPrice2.Text & “*” & TBoxQty2.Text & “+” & “二樓VIP" & TBoxPrice3.Text & "*" & TBoxQty3.Text) • End Sub

  8. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click • TBoxQty1.Text = 0 • TBoxQty2.Text = 0 • TBoxQty3.Text = 0 • total = 0 • Label7.Text = "$" & total & "元" • ListBox1.Items.Clear() • End Sub • Private Sub TBoxPrice1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TBoxPrice1.TextChanged • End Sub • End Class

  9. 心得 : • 我在做報告做的不是很好,在做得時後遇到很多挫折 可是我不惜一切把報告做好了。 我這學期上這門課、學到很多東西,我會好好記在頭腦裡 我覺得老師很有趣,上這門課很開心,因為老師人很好 最後 老師 你真的很帥喔~

More Related