Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please can someone provide me with a Structured English Pseudo Code for this pro

ID: 3863401 • Letter: P

Question

Please can someone provide me with a Structured English Pseudo Code for this program in Visual Basic. The instructions are attached below

Tipping Write a program to compute tips for services rendered. The program should request the person's occupation, the amount of the bill, and the percentage tip as input and pass this information to a Sub procedure to display the person and the tip. A sample run is shown in Fig 5.20. Gratuities O x Person's occupation: addrver Amount of the bil: 2000 Percentage tip: 15 Compute Tip Tip the taxi driver$300. FIGURE 5.20 Possible outcome of Exercise 34.

Explanation / Answer

Answer :-

Module -Level Declaration :-

Const gst As Decimal = 0.1
Const mdecCarn_PRICE As Decimal = 14.3
Const mdecIRISE_PRICE As Decimal = 9.7
Const mdecROSE_PRICE As Decimal = 8.5

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'Declaring form variables

Dim deliveryPrice As Decimal
Dim quantity As Decimal
Dim quantity2 As Decimal
Dim quantity3 As Decimal
Dim subTotal1 As Decimal
Dim subTotal2 As Decimal
Dim subTotal3 As Decimal

'Variable values equal text box controls

deliveryPrice = deliveryPriceInput.Text
quantity = txtQuantity.Text
quantity2 = iriseQuantity.Text
quantity3 = txtCarnQty.Text
addedDelivery.Text = FormatCurrency(deliveryPrice)

'label values hold quantity values and multiply's it by the flowers price

lblextendedPrice.Text = FormatCurrency(quantity * mdecROSE_PRICE)
lblirise_extendedPrice.Text = FormatCurrency(quantity2 * mdecIRISE_PRICE)
lblcarn_extendedPrice.Text = FormatCurrency(quantity3 * mdecCarn_PRICE)

'Sub total variables set up to hold extended price values

subTotal1 = FormatCurrency(lblextendedPrice.Text)
subTotal2 = FormatCurrency(lblirise_extendedPrice.Text)
subTotal3 = FormatCurrency(lblcarn_extendedPrice.Text)

'Quantity sub totals and delivery price are added together to hold sub total value

lblsubTotal.Text = FormatCurrency(subTotal1 + subTotal2 + subTotal3 + deliveryPrice)

'Sub total value is mulitplied with gst value of 0.1% to produce gst price figure

gstTotal.Text = FormatCurrency(lblsubTotal.Text * gst)

'All values are added together to produce final total

lbltotalPrice.Text = FormatCurrency(gstTotal.Text + deliveryPrice + subTotal1 + subTotal2 + subTotal3)