Question: (Unit Price)Write a Visual Basicprogram toperform following tasks.(OnePound is equal to 16 ounces). Required: Request the price and weight of an item in pounds and
(Unit Price)Write a Visual Basicprogram toperform following tasks.(OnePound is equal to 16 ounces). Required: Request the price and weight of an item in pounds and ounces, and then determine the price per ounce (user input) Required: When the user clicks on the Determinethe Unit Pricebutton, the following display as Price per Ounce. Initially, when the program is loaded, the formUnit Price should appear, as shown in the following display.
Unit Price X Price of item Weight Ounces Pounds: Determine Unit Price Price per ounce: Once the program is run, the form should be ready for entry, as shown below (suppose the user enters 35.75 (as the price of the item) and 2 pounds and 8 ounces as the weight of the item in the appropriate text boxes (see below) Unit Price Price of tem: 3575 Weight Pound 2 Ounces Determina Unt Price Price per ounce Now, while the program is running, and the user clicks on the Determine the Unit Price "button, the following display as Price per Ounce. Unit Price Frice tent 35.75 Weight Fourde 2 Ouncer: 8 Determine Util Pice Pies per ence: 5009 Please note in order to display the Price Per Ounce in two decimal places, please lise the appropriate function to convert, for example Tostring("C"). Recommended naming convention: For control objects appearing in the Code Editor. Name Text Property ReadOnly Control Description Property property Type ErmUnitPrice Unit Price Form Holds application's controls stPrice Text Box Captures the price of an item entered txtPounds Text Box Captures the we.ght of the item (pounds portion) entered extOunces Text Box Captures the weight of the item (Ounces portion) entered btnDctcrminc Determine Button Triggers the cvent for displaying price of an item per Unit Price ounce extUnitPrice True Text Box Displays price of an item per ounce Remember that in addition of the above, you are required to apply sultable naming convention to all variables that are declared and used (accessed in the application) in the program code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
