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
write a program that computes an integer's checksum. to compute the checksum, break the integer into its constituent
Serggg [28]

Using the knowledge in computational language in python it is possible to write a code that computes an integer's checksum.

<h3>Writting the code:</h3>

<em>def checkSum(n):                    # Function definition</em>

<em>    total = 0                       # total variable which returns sum</em>

<em>    c = 0                           # counter variable which count the even position</em>

<em>    while(n!=0):                    # running a loop while n != 0</em>

<em>        r = int(n%10)               #breaking the number into digits</em>

<em>        c=c+1                       # increase counter</em>

<em>        if c%2==0:                  # if counter is even position then double the number </em>

<em>            r = r*2</em>

<em>            while(r!=0):                            # do the process</em>

<em>                total = total + int(r%10)</em>

<em>                r = int(r/10)</em>

<em>            n=int(n/10)    </em>

<em>        else:                       # if counter is odd position then simple add the digit </em>

<em>            total = total + r       # into total</em>

<em>            n=int(n/10)</em>

<em>    return total                    # in the last return the sum of digits</em>

<em># Driver code</em>

<em>n = int(input("Enter Number:"))         # asking user to enter the number </em>

<em>print(checkSum(n))                      # calling the function</em>

See more about python at brainly.com/question/18502436

#SPJ1

8 0
1 year ago
suppose as a head software engineer you assign the job of creating a class to a subordinate. You want to specify thirty-eight di
Goryan [66]

Answer:

jskjsjsjsjskdmsnjsnsnsns

8 0
3 years ago
What do you think of my profile picture
Gnom [1K]

ayo it's pretty sweet lma.o.

8 0
3 years ago
Read 2 more answers
What is the management part of a dashboard?
Stolb23 [73]

Answer:

 The management dashboard is the visual and display the KPI ( Key performance indicator) and metrics for monitoring the specific process and department.

It is basically used for checking whether the organization achieve or meet its specific goals not as per the requirement of the particular department in the organization.

The main part of the management dashboard is that it provide the visibility and alignment in the particular organization so that it meets according to the requirements of the organization. The basic requirement in the organization are:

  • Business user
  • Organization needs
  • Information technology (IT) needs

7 0
2 years ago
Write a simple algorithm in pseudocode that asks the user their favourite colour and then agrees with their choice, quoting the
olga55 [171]

Answer:

i am still a beginner in this but i hope it helps.

  • add scanner object;
  • declare string FavColour;
  • print msg to ask user for input
  • scan input FavColour;
  • print msg (" your favourite colour is " + FavColour)

3 0
3 years ago
Other questions:
  • Using the flowchart below, what value when entered for Y will generate a mathematical error and prevent our flowchart from being
    14·1 answer
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    7·1 answer
  • What two units are used to measure the frequency and amplitude of a sound wave?
    10·1 answer
  • What movie would be greatly improved if it was made into a musical?
    6·1 answer
  • The most common types of effects include entrances and exits
    11·1 answer
  • A ____ is a a set of presentation rules that control how text should look. It is applied to an XML file to change the collection
    9·1 answer
  • 4.9 Code Practice: Question 4 Edhisive
    14·2 answers
  • During the data transmission there are chances that the data bits in the frame might get corrupted. This will require the sender
    6·1 answer
  • What's the difference between joystick and mouse​
    10·2 answers
  • Write a format operation that builds a string for the float variable amount that
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!