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
You have implemented a network where hosts are assigned specific roles, such as for file sharing and printing. Other hosts acces
yulyashka [42]

<u>Client-server</u> implemented a network where hosts are assigned specific roles, such as for file sharing and printing. Other hosts access those resources but do not host services of their own.

<u>Explanation:</u>

The client-server can be utilized on the web just as on a neighborhood (LAN). Instances of customer server frameworks on the web incorporate internet browsers and web servers, FTP customers and servers, and the DNS. Different hosts get to those assets yet don't have administrations of their own. Since it permits arrange permits numerous PCs/gadgets to interface with each other and offer assets.

5 0
3 years ago
What is out put.what is data. what is microprocessor
adelina 88 [10]

Answer:

Data is raw or unorganized facts

Explanation:

If something outputs something, it means it brings out something

7 0
3 years ago
Changes in the ownership of a file do not change the amount of data that is considered to belong to a user.
professor190 [17]
False because if you edit the ownership of file it will give permissions only with the permissions you can edit file,rename,or delete file.
5 0
2 years ago
The __________ is a worldwide collection of networks that links millions of businesses, govenment agencies, educational institut
Vlad [161]
<span>The INTERNET is a worldwide collection of networks that links millions of businesses, government agencies, educational institutions, and individuals.</span>
5 0
3 years ago
On the first line, place your name in a comment. Create a program that does the following: Take in three integer numbers from th
Helen [10]

Answer and Explanation:

//buchi

Var firstNumber=prompt("please enter first number");

Var secondNumber=prompt("please enter second number");

Var thirdNumber=prompt("please enter third number");

Var numberTotal=firstNumber+secondNumber+thirdNumber;

Function calculateNumbers(){

return numberTotal;

return int(numberTotal/3);

return firstNumber*secondNumber*thirdNumber;}

Console.log(calculateNumbers());

8 0
3 years ago
Other questions:
  • How to find i with superposition method
    8·1 answer
  • How many much memory is in one megabyte ?
    9·1 answer
  • Question 1 Multiple Choice Worth 5 points)
    10·1 answer
  • Last week, a disk containing CSM Tech Publishing’s current project manuscripts crashed. Fortunately, there was a backup, but all
    15·1 answer
  • Similarites between hardware and software
    9·1 answer
  • What is GND and what color wire do we connect to GND? (this is like for circuits and stuff btw)
    7·1 answer
  • 69696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
    8·1 answer
  • How does links helped a student like you in navigating the different available websites?
    5·1 answer
  • A security operation center (SOC) analyst investigates the propagation of a memory-resident virus across the network and notices
    15·1 answer
  • For a certain company, the cost function for producing x items is C(x)=50x+100 and the revenue function for selling x items is R
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!