Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise: Pinata pricing You sell three different types of pinatas. Pandas cost $14 each, lambs cost $12 each, and bunnies cost $9 each. Write a

Exercise: Pinata pricing

You sell three different types of pinatas. Pandas cost $14 each, lambs cost $12 each, and bunnies cost $9 each. Write a program that computes the total price of an order.

Heres a sample:

image text in transcribed

The program validates the three input fields. They should all be numbers zero or more. If any of them is bad, show one error message, like this:

image text in transcribed

Dont create your own workbook. Download this one instead. It has some code already there:

Private Sub cmdRun_Click()

Dim pandas As Integer

Dim lambs As Integer

Dim bunnies As Integer

Dim inputOK As Boolean

Dim totalPrice As Integer

Input

getInputs pandas, lambs, bunnies, inputOK

If Not inputOK Then

There was a problem with the input.

End

End If

Compute the total price.

computePrice pandas, lambs, bunnies, totalPrice

Output the total prie.

outputPrice totalPrice

End Sub

Dont change this code! Dont add or remove anything. Your job is to write the Subs. All the usual coding standards apply.

4 5 4 3 2 1 How many pinatas of each type would you like? 3 Panda 4 Lamb 5 Bunny Run 9 Price 35

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions