The application should calculate and display a salespersons
The application should calculate and display a salesperson\'s commission. The commission rate is 20% when the sales amount is is at least $25,000, otherwise the commission rate is 15%. Display the commission with a dollar sign and two decimal places. Write the pseudocode for the calcButton_Click procedure and then code the procedure. Save the solution and then start and test the application. Close and submit this week\'s entire project folder into a single zip file. Submit the zip file to the form inside this folder.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Public Class MainForm
Inherits System.Windows.Forms.Form
\'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
\'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
\'NOTE: The following procedure is required by the Windows Form Designer
\'It can be modified using the Windows Form Designer.
\'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label()
Me.salesTextBox = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.commLabel = New System.Windows.Forms.Label()
Me.calcButton = New System.Windows.Forms.Button()
Me.exitButton = New System.Windows.Forms.Button()
Me.SuspendLayout()
\'
\'Label1
\'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(30, 32)
Me.Label1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
Me.Label1.Name = \"Label1\"
Me.Label1.Size = New System.Drawing.Size(46, 20)
Me.Label1.TabIndex = 0
Me.Label1.Text = \"&Sales:\"
\'
\'salesTextBox
\'
Me.salesTextBox.Location = New System.Drawing.Point(34, 55)
Me.salesTextBox.Margin = New System.Windows.Forms.Padding(2, 4, 2, 4)
Me.salesTextBox.Name = \"salesTextBox\"
Me.salesTextBox.Size = New System.Drawing.Size(91, 27)
Me.salesTextBox.TabIndex = 1
\'
\'Label2
\'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(32, 98)
Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
Me.Label2.Name = \"Label2\"
Me.Label2.Size = New System.Drawing.Size(93, 20)
Me.Label2.TabIndex = 4
Me.Label2.Text = \"Commission:\"
\'
\'commLabel
\'
Me.commLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.commLabel.Location = New System.Drawing.Point(37, 118)
Me.commLabel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0)
Me.commLabel.Name = \"commLabel\"
Me.commLabel.Size = New System.Drawing.Size(91, 30)
Me.commLabel.TabIndex = 5
Me.commLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
\'
\'calcButton
\'
Me.calcButton.Location = New System.Drawing.Point(168, 52)
Me.calcButton.Margin = New System.Windows.Forms.Padding(2, 4, 2, 4)
Me.calcButton.Name = \"calcButton\"
Me.calcButton.Size = New System.Drawing.Size(94, 31)
Me.calcButton.TabIndex = 2
Me.calcButton.Text = \"&Calculate\"
\'
\'exitButton
\'
Me.exitButton.Location = New System.Drawing.Point(168, 88)
Me.exitButton.Margin = New System.Windows.Forms.Padding(2, 4, 2, 4)
Me.exitButton.Name = \"exitButton\"
Me.exitButton.Size = New System.Drawing.Size(94, 31)
Me.exitButton.TabIndex = 3
Me.exitButton.Text = \"E&xit\"
\'
\'MainForm
\'
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(286, 191)
Me.Controls.Add(Me.exitButton)
Me.Controls.Add(Me.calcButton)
Me.Controls.Add(Me.commLabel)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.salesTextBox)
Me.Controls.Add(Me.Label1)
Me.Font = New System.Drawing.Font(\"Segoe UI\", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.MaximizeBox = False
Me.Name = \"MainForm\"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = \"Commission Calculator\"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents salesTextBox As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents commLabel As System.Windows.Forms.Label
Friend WithEvents calcButton As System.Windows.Forms.Button
Friend WithEvents exitButton As System.Windows.Forms.Button
End Class
Solution
Pseduo code:
open the function
Get the salesamount as decimal
check the salesamount whether its above 25000
then, fix rate = 20%
else fix rate =15%
Now calculate commison = rate/100 * 25000


