Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to code a program siimilar to this answer instead of finding the area of the circle, find the area of the rectangle. Here is

how to code a program siimilar to this answer instead of finding the area of the circle, find the area of the rectangle. Here is the sample answer: Private Sub btnCompute_Click(...) Handles btnCompute.Click Dim shapeNum As Integer Dim radius, length, height, width As Double 'Input choice of shape and its dimensions '1. Circle 2. Parallelogram 3. Kite shapeNum = CInt(mtbSelection.Text) 'Mask is 0 Select Case shapeNum Case 1 radius = CDbl(InputBox("Input the radius of the circle: ")) txtArea.Text = CStr(3.141593* radius ^2) Case 2 length = CDbl(InputBox("Input the length of the parallelogram: ")) height = CDbl(InputBox("Input the height of the parallelogram: ")) txtArea.Text = CStr(length * height) Case 3 length = CDbl(InputBox("Input the length of the kite: ")) width = CDbl(InputBox("Input the width of the kite: ")) txtArea.Text = CStr((length * width)/2) Case Else MessageBox.Show("Your choice is not valid.", "Try Again.") mtbSelection.Clear() End Select mtbSelection.Focus() End Sub

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

5. Develop a self-management module for a training program.

Answered: 1 week ago