VB.NET Calculator: Selling Calculator Assignment - University XYZ
VerifiedAdded on 2022/08/12
|4
|253
|157
Practical Assignment
AI Summary
This assignment presents a solution for a VB.NET selling calculator. The solution includes the complete code, which utilizes radio buttons for color selection and a checkbox for a foldable option. The code calculates the price based on these selections, using a `GetMatColor` function to determine the ...

Running head: MAT SELLING CALCULATOR USING VISUAL BASIC
MAT SELLING CALCULATOR USING VISUAL BASIC
Name of the Student
Name of the University
Author Note
MAT SELLING CALCULATOR USING VISUAL BASIC
Name of the Student
Name of the University
Author Note
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1MAT SELLING CALCULATOR USING VISUAL BASIC
Solution 8
Code Part:
Public Class Form1
Private Function GetMatColor(ByVal intColor As Integer) As Integer
If radBlue.Checked Then
Return intColor
ElseIf radRed.Checked Then
Return intColor + 10
Else
Return intColor + 15
End If
End Function
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles
btnCalculate.Click
Dim intType As Integer
If radStandard.Checked Then
intType = GetMatColor(99)
ElseIf radDeluxe.Checked Then
intType = GetMatColor(129)
Else
intType = GetMatColor(179)
End If
If chkFoldable.Checked Then
intType += 25
lblPrice.Text = intType.ToString("C0")
Else
lblPrice.Text = intType.ToString("C0")
End If
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles
btnExit.Click
Me.Close()
End Sub
End Class
Solution 8
Code Part:
Public Class Form1
Private Function GetMatColor(ByVal intColor As Integer) As Integer
If radBlue.Checked Then
Return intColor
ElseIf radRed.Checked Then
Return intColor + 10
Else
Return intColor + 15
End If
End Function
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles
btnCalculate.Click
Dim intType As Integer
If radStandard.Checked Then
intType = GetMatColor(99)
ElseIf radDeluxe.Checked Then
intType = GetMatColor(129)
Else
intType = GetMatColor(179)
End If
If chkFoldable.Checked Then
intType += 25
lblPrice.Text = intType.ToString("C0")
Else
lblPrice.Text = intType.ToString("C0")
End If
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles
btnExit.Click
Me.Close()
End Sub
End Class

2MAT SELLING CALCULATOR USING VISUAL BASIC
Testing the application with data:
Fig: Testing the application with same options to that of the problem statement
Fig: Testing the application with same radio button options to that of the problem statement
(with Foldable Check Box Checked)
Fig: Testing the application with Deluxe Pink radio button options checked (and Foldable
Check Box Checked)
Testing the application with data:
Fig: Testing the application with same options to that of the problem statement
Fig: Testing the application with same radio button options to that of the problem statement
(with Foldable Check Box Checked)
Fig: Testing the application with Deluxe Pink radio button options checked (and Foldable
Check Box Checked)
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3MAT SELLING CALCULATOR USING VISUAL BASIC
Fig: Testing the application with Premium Red radio button options checked (and Foldable
Check Box Unchecked)
Fig: Testing the application with Premium Red radio button options checked (and Foldable
Check Box Unchecked)
1 out of 4

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.