Question
Question 1 and 2 ... Visual Basic
dlear the contents of the textboxes. Do not accept a negative value for any of the inputs. Your application should have a button clear and utilize a separate procedure to e an application that prompts the user to enter todays sales for five program should then display a simple bar graph comparing each 2. Creat stores. The stores sales. Create each bar in the bar grah by displaying a row of asterisks (*) in a list box. Each asterisk in a bar represents $100 in sales The following figure shows the bar chart when the sales data entered was $1000 for store # 1, $1200 for store # 2, $1800 for store # 3, $800 for store # 4, and $1900 for store # 5. Store 2: **xxx*xx**** Store 3: xxxxxxx* Store 4: **xx***x*xxx*xx***x
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dim intData(4) As Integer
Public Function extc(ByVal no As Integer) As String
Dim str2 As String
str2 = "*"
For a = 0 To no - 2 Step 1

str2 = str2 + " " + "*"
Next
Return str2
End Function

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' for loop execution
Dim b As Integer
Dim str As String
Dim str3, str4 As String
For a = 0 To 4 Step 1

str = "Enter store" + (a + 1).ToString + "'s Sales"
b = InputBox(str, "Today's 5 stores' sales ", "Enter sales here")
intData(a) = b
Next

Dim no As Integer
For a = 0 To 4 Step 1
no = intData(a) / 100
str3 = extc(no)
str4 = "Store " + (a + 1).ToString + " : " + str3
'Label1.Text = str4
ListBox1.Items.Add(str4)
Next
End Sub

1200

Store l: r* Store 4: a * * Store 5: r*r*

this is the code and output as u needed. if u have any query then i am here for help.

if you want full code then i will send u the zippyshare link of full program.

Add a comment
Know the answer?
Add Answer to:
Question 1 and 2 ... Visual Basic dlear the contents of the textboxes. Do not accept...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Project 2 Description Create a Visual C# project that when an employee's biweekly sales amount is...

    Project 2 Description Create a Visual C# project that when an employee's biweekly sales amount is entered and the Calculate button is pressed, the gross pay, deductions, and net pay will be displayed. Each employee will receive a base pay of $1200 plus a sales commission of 8% of sales. Once the net pay has been calculated, display the budget amount for each category listed below based on the percentages given.         base pay = $1200; use a named...

  • Visual Basic Programming Step 1-2 not important, it's just file naming.

    Visual Basic Programming Step 1-2 not important, it's just file naming. 3. Form contains nine Labels, one TextBox, and three Button controls. You use labels to let user know what to enter and what will be displayed; TextBoxes to input a number between 1 and 99. Buttons to Calculate change. Clear Input and Exit program. See below Form Layout with Controls for more details 4. Declare variables to store the entered value in TextBox, and what will be displayed in...

  • Visual Basic Programming Step 1-2 not important, it's just file naming. 3. Form contains nine Labels,...

    Visual Basic Programming Step 1-2 not important, it's just file naming. 3. Form contains nine Labels, one TextBox, and three Button controls. You use labels to let user know what to enter and what will be displayed; TextBoxes to input a number between 1 and 99. Buttons to Calculate change. Clear Input and Exit program. See below Form Layout with Controls for more details 4. Declare variables to store the entered value in TextBox, and what will be displayed in...

  • visual basic help DI Question 3 2 pts You may only bind an object to a control that the computer creates for you O True O False D | Question 4 2 pts The Do..Loop statement can be used to code b...

    visual basic help DI Question 3 2 pts You may only bind an object to a control that the computer creates for you O True O False D | Question 4 2 pts The Do..Loop statement can be used to code both a pretest loop and a posttest loop. True False Question 5 2 pts You can prevent many unintentional errors from occurring in an application by declaring the variables using the maximum scope needed. True False 2 pts Question...

  • If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but...

    If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but minor discrepancies may require you to adjust. If you are attempting this assignment using another version of Visual Studio, you can expect differences in the look, feel, and/or step-by-step instructions below and you’ll have to determine the equivalent actions or operations for your version on your own. INTRODUCTION: In this assignment, you will develop some of the logic for, and then work with, the...

  • C++ requirements The store number must be of type unsigned int. The sales value must be...

    C++ requirements The store number must be of type unsigned int. The sales value must be of of type long long int. Your program must properly check for end of file. See the section Reading in files below and also see your Gaddis text book for details on reading in file and checking for end of file. Your program must properly open and close all files. Failure to follow the C++ requirements could reduce the points received from passing the...

  • Only need help with question 5 2 CASE The Human Resource Function of Harrison Brothers Corporation...

    Only need help with question 5 2 CASE The Human Resource Function of Harrison Brothers Corporation COMPANY HISTORY Harrison Brothers Corporation n was founded in upstate New York on September 15, 1898, by Aubrey and William Harrison. Harrison Brothers is a multi-line traditional department store tha t cares mainly men's, wome expanded to include household furnishings and other items for the home. The long-term goal of the company is to become the leading chain of department stores in the Northeast,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT