1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
trasher [3.6K]
3 years ago
13

Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to

the GUI in the starter program. A text box to accept the part number (Only one is allowed A1B) Note the user may enter spaces before or after the part number and may enter the letters in lower or upper case. You program must accommodate that.

Computers and Technology
1 answer:
Ugo [173]3 years ago
5 0

Answer:

Imports System.Text.RegularExpressions

Public Class Form2

   Private Shared Function Num1(ByVal val As String) As Integer

       Dim retrnVal As String = String.Empty

       Dim collect As MatchCollection = Regex.Matches(val, "\d+")

       For Each mat As Match In collect

           retrnVal += mat.ToString()

       Next

       Return Convert.ToInt32(retrnVal)

   End Function

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

       TextBox1.Text = Num1(TextBox1.Text)

       Dim Total As Integer = 0

       Dim A1b As Integer = Convert.ToInt32(TextBox1.Text)

       Label1.Text = 250

       Label2.Text = 25

       If Convert.ToInt32(TextBox1.Text) = A1b Then

           If Convert.ToInt16(Label1.Text) < 10 Then

               Total = 10.5 * Convert.ToInt16(Label1.Text)

           Else

               Total = 8.75 * Convert.ToInt16(Label1.Text)

           End If

           If CheckBox1.Checked Then

               Total = Total + 10

           Else

               Total = Total + 5

           End If

           TextBox2.Text = Convert.ToString(Total)

       End If

End Sub

Explanation:

Please check the answer section and the attachment. Also, please check the method. We have used the regular expression over there. And we have imported the regularexpression library for that. And this is to ensure we can read integer from textbox no matter whether the user inputs empty spaces or characters in lower and upper case in between.

You might be interested in
Which two statements describe benefits of a block-based coding language
gladu [14]
Answer D and B I think
8 0
2 years ago
Read 2 more answers
HOW IS THE AUTOFILL FEATURE HELPFUL? A.IT CREATE A NEW FORMULA FOR EVERY CELL IN THE DOCUMENT B.IT CAN SAVE TIME BY ALLOWING YOU
bulgar [2K]
B. it can save time by allowing you to quickly fill cells
4 0
3 years ago
Which of these is NOT an advantage of the impact of computer careers.
nikdorinn [45]
I believe the answer could be the first choice. I'm not quite sure, though
4 0
3 years ago
Read 2 more answers
Differcence between displayed output and printed output
Harrizon [31]

Answer:

The display output specifies the variable's data type and returns output line by line. The print output, on the other hand, does not indicate the variable's data type and does not deliver output line by line. The print output can be used to portray any type of data, such as a string or an approximate value. The display output is a Python programming capability that is used to comprehend a line of text given by the user.

6 0
2 years ago
building a robot that could perform surgery on its own. Would you rather have it rely on a basic algorithm with a human supervis
PolarNik [594]
Program that uses machine learning.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Steve wants to become a successful graphic design entrepreneur. Which entrepreneurial approach will help him succeed? A. working
    14·1 answer
  • Lesson 15: Integrated Literacy Connections Education Introduction to Computer Applications Unit 6: Internet Safety
    5·1 answer
  • How has technology fragmented the audience for sports and entertainment<br> commodities?
    10·1 answer
  • What type of identity theft occurs when a thief spends another person's money or opens a line of credit in their name?
    8·2 answers
  • Discuss the types of data that business might collect and how the business could use that data to drive decision-making in a spe
    15·1 answer
  • The basic form of backup used in magnetic tape operations is called
    11·1 answer
  • The following types of websites are
    10·1 answer
  • The five types of personal computers are: desktops, laptops, tablets, smartphones, and
    9·1 answer
  • Luis saves an attachment that he received from Kevin. Where will the attachment save by default?
    5·1 answer
  • Classify the following as cross-section or time-series data: Gross sales of 200 ice cream parlors in July 2009
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!