Not really sure if anyone can help me but i doing this project and i have to make my coding into Pseudo Code and struggling on making my code Pseudo just wondering could anyone help me out?
I have to make it Standard English
Code:
Public Class FrmTotal
Dim price As Single
Dim price1 As Single
Dim price2 As Single
Dim itemlist(0 To 9) As String
Dim pricelist(0 To 9) As Single
Dim qntylist(0 To 9) As Single
Dim totallist(0 To 9) As Single
Dim number As Single
Dim total As Single
Dim PizzaCombo As Single
Dim DrinksCombo As Single
Dim credit As Single
Dim discount As Single
Dim pass As Single
Dim takeaway As Single
Dim subtotal As Single
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CboBox1.SelectedIndexChanged
If CboBox1.Text = "Margherita" Then
price = 2.5
ElseIf CboBox1.Text = "Garlic Mushroom" Then
price = 3.5
ElseIf CboBox1.Text = "Hot Mexican Special" Then
price = 3.9
ElseIf CboBox1.Text = "Pepperoni" Then
price = 4.5
ElseIf CboBox1.Text = "Tuna" Then
price = 3.9
End If
End Sub
Private Sub CboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CboBox2.SelectedIndexChanged
If CboBox2.Text = "Plain Burger" Then
price1 = 2.2
ElseIf CboBox2.Text = "Cheese Burger" Then
price1 = 2.4
ElseIf CboBox2.Text = "Spicy Chicken Grilled Burger" Then
price1 = 2.8
ElseIf CboBox2.Text = "Chilli Burger" Then
price1 = 2.5
End If
End Sub
Private Sub CboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CboBox3.SelectedIndexChanged
If CboBox3.Text = "All soft drink cans" Then
price2 = 0.9
ElseIf CboBox3.Text = "1.5 Litre Bottles" Then
price2 = 2.25
End If
End Sub
Private Sub BtnOrder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOrder.Click
FrmQnty.Show()
FrmKitchen.Show()
For i As Byte = 0 To number - 1
FrmQnty.LblOrdered.Text = FrmQnty.LblOrdered.Text & itemlist(i) & vbCrLf
FrmQnty.LblItemPrice.Text = FrmQnty.LblItemPrice.Text & Format(pricelist(i), "currency") & vbCrLf
FrmQnty.LblQnty.Text = FrmQnty.LblQnty.Text & qntylist(i) & vbCrLf
FrmKitchen.LblKitchenshow.Text = FrmKitchen.LblKitchenshow.Text & itemlist(i) & vbCrLf
FrmKitchen.LblQnty.Text = FrmKitchen.LblQnty.Text & qntylist(i) & vbCrLf
Next
FrmQnty.LblTotal.Text = "Total is " & Format(total, "currency")
If ChkCredit.Checked = True Then
credit = total * 0.03
End If
FrmQnty.LblCredit.Text = "Credit charge is " & Format(credit, "Currency")
If ChkVoucher.Checked = True Then
discount = total * 0.05
End If
FrmQnty.LblVoucher.Text = "Voucher is " & Format(discount, "Currency")
If ChkSeason.Checked = True Then
pass = total * 0.1
FrmQnty.LblPass.Text = "Pass Discount " & Format(pass, "Currency")
End If
takeaway = discount + pass
FrmQnty.LblDiscountTotal.Text = "Total Discount " & Format(takeaway, "Currency")
subtotal = total - takeaway + credit
FrmQnty.Lblsubtotal.Text = " Sub Total us " & Format(subtotal, "Currency")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDrink.Click
itemlist(number) = CboBox3.Text
qntylist(number) = Cbo3.Text
pricelist(number) = price2
total = qntylist(number) * pricelist(number) + total
number = number + 1
LblTotal.Text = total
LblTotal.Text = "Total Price " & Format(total, "Currency")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnBurgers.Click
itemlist(number) = CboBox2.Text
qntylist(number) = Cbo2.Text
pricelist(number) = price1
total = qntylist(number) * pricelist(number) + total
number = number + 1
LblTotal.Text = total
LblTotal.Text = "Total Price " & Format(total, "Currency")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPizza.Click
itemlist(number) = CboBox1.Text
qntylist(number) = Cbo1.Text
pricelist(number) = price
total = qntylist(number) * pricelist(number) + total
number = number + 1
LblTotal.Text = total
LblTotal.Text = "Total Price " & Format(total, "Currency")
End Sub
Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
Me.Close()
End Sub
End Class