0% found this document useful (0 votes)
17 views18 pages

Aman2

The document outlines a practical assignment for a Bachelor of Computer Application program at Hemchand Yadav Vishwavidyalaya, focusing on various programming tasks using Dot Net Technology. It includes six practical exercises, each with specific aims, form designs, and corresponding code to implement functionalities such as finding maximum numbers, checking number characteristics, calculating grades based on marks, and computing salaries and electricity bills. The assignment is guided by Mrs. Shweta Singh and submitted by Satish Sah.

Uploaded by

amantikriha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views18 pages

Aman2

The document outlines a practical assignment for a Bachelor of Computer Application program at Hemchand Yadav Vishwavidyalaya, focusing on various programming tasks using Dot Net Technology. It includes six practical exercises, each with specific aims, form designs, and corresponding code to implement functionalities such as finding maximum numbers, checking number characteristics, calculating grades based on marks, and computing salaries and electricity bills. The assignment is guided by Mrs. Shweta Singh and submitted by Satish Sah.

Uploaded by

amantikriha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

A

Practical Assignment
On
“Dot Net Technology Lab”

Bachelor of Computer Application -III Year


From
Hemchand Yadav Vishwavidyalaya, Durg (C.G)
SESSION: 2024-25

Guided By:- Submitted By:-


Mrs. Shweta Singh Satish Sah
(Assistant Professor) Class:-BCA-III

Submitted To:
GD RUNGTA COLLEGE OF SCIENCE & TECHNOLOGY,
BHILAI (C.G)
Practical No:-01
Aim:- Write A Program To Find Maximum Between Three Numbers.
Form Design:-

Code:-
Public Class Form1
Dim A As Integer
Dim B As Integer
Dim C As Integer
Dim D As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox6.Text = ""
TextBox7.Text = ""
TextBox5.Text = ""
TextBox8.Text = ""
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
A = Val(TextBox7.Text)
B = Val(TextBox6.Text)
C = Val(TextBox5.Text)
If (A > B) Then
If (B > C) Then
TextBox8.Text = A
End If
ElseIf (B > C) Then
TextBox8.Text = B
Else
TextBox8.Text = C
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Close()
End Sub
End Class

OUTPUT
Practical No:-02

Aim:- Write A Program To Check Whether A Number Is


Negative, Positive Or Zero.

Form Design:-

Code:-
Public Class Form1
Dim A As Integer
Dim B As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox7.Text = ""
TextBox4.Text = ""
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
A = Val(TextBox7.Text)
If (A < 0) Then
B = "Number Is Negative"
TextBox4.Text = B
ElseIf (A = 0) Then
B = "Number Is Zero"
TextBox4.Text = B
Else
B = "Number Is Positive"
TextBox4.Text = B
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Close()
End Sub
End Class

OUTPUT:-
Practical No:-03

Aim:- Write A Program To Check Whether A Character Is


Alphabet Or Not.

Form Design:-

Code:-
Public Class Form1
Dim A As Char
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox4.Text = ""
TextBox7.Text = ""
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
A = TextBox7.Text
If (A >= "a" And A <= "z") Then
TextBox4.Text = "It Is A Character"
ElseIf (A >= "A" And A <= "Z") Then
TextBox4.Text = "It Is A Character"
Else
TextBox4.Text = "It Is Not A Character"
End If
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles


Button3.Click
Close()
End Sub
End Class

OUTPUT:-
Practical No:-04
Aim:- Design An Application To Input Marks Of Five Subjects:-
Physics, Chemistry, Biology, Mathematics And Computer.
Calculate Percentage And Grade.
Percentage>90%:Grade A
Percentage>=80%:Grade B
Percentage>70%:Grade C
Percentage>60%:Grade D
Percentage>=40%:Grade E
Percentage<40%:Grade F

Form Design:-
Code:-
Public Class Form1
Dim A, B, C, D, K, T, p As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox3.Text = ""
TextBox5.Text = ""
TextBox7.Text = ""
TextBox9.Text = ""
TextBox11.Text = ""
TextBox13.Text = ""
TextBox15.Text = ""
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
A = Val(TextBox3.Text)
B = Val(TextBox5.Text)
C = Val(TextBox7.Text)
D = Val(TextBox9.Text)
K = Val(TextBox11.Text)
T = (A + B + C + D + K)
TextBox17.Text = T
p = (A + B + C + D + K) / 500 * 100
TextBox13.Text = p
If (p <= 100) And (p >= 90) Then
TextBox15.Text = "A"
ElseIf (p < 90) And (p >= 80) Then
TextBox15.Text = "B"
ElseIf (p < 80) And (p >= 70) Then
TextBox15.Text = "C"
ElseIf (p < 70) And (p >= 60) Then
TextBox15.Text = "D"
ElseIf (p < 60) And (p >= 40) Then
TextBox15.Text = "E"
ElseIf (p < 40) Then
TextBox15.Text = "F"
Else
TextBox15.Text = "Invalid Grade"
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Close()
End Sub
End Class

OUTPUT:-
Practical No:-05
Aim:- Design an application to input basic salary of an employee
and calculate its gross salary following:
Basic Salary <= 10000: HRA = 20%, DA = B0%
Basic Salary <n20000: HRA = 25%, DA = 90%
Basic Salary > 20000 : HRA = 30%, DA = 95%
Form Design:-
Code:-
Public Class Form1
Dim a, b, c As String
Dim gs, da, hra As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox3.Text = ""
TextBox5.Text = ""
TextBox7.Text = ""
TextBox9.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
a = (TextBox9.Text)
TextBox5.Text = a
b = (TextBox3.Text)
TextBox20.Text = b
c = (TextBox7.Text)
TextBox19.Text = c

If c <= 10000 Then


TextBox22.Text = "80%"
TextBox21.Text = "20%"
da = (80 / 100) * c
hra = (20 / 100) * c
gs = c + hra + da
TextBox18.Text = da
TextBox17.Text = hra
TextBox16.Text = gs
ElseIf c > 10000 And c <= 20000 Then
TextBox22.Text = "90%"
TextBox21.Text = "25%"
da = (90 / 100) * c
hra = (25 / 100) * c
gs = c + hra + da
TextBox18.Text = da
TextBox17.Text = hra
TextBox16.Text = gs
Else
TextBox22.Text = "95%"
TextBox21.Text = "30%"
da = (95 / 100) * c
hra = (30 / 100) * c
gs = c + hra + da
TextBox18.Text = da
TextBox17.Text = hra
TextBox16.Text = gs
End If

End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Close()
End Sub
End Class

OUTPUT:-
Practical No:-06
Aim:- Design an application to input electricity unit charges and
calculate the given condition:
For first 50 units Rs. 0.50/unit
For next 100 units Rs. 0.75/unit
For next 100 units Rs. 1.20/unit
For unit above 250 Rs. 1.50/unit
An additional surcharge of 20% is added to the bill
Form Design:-
Code:-
Public Class Form1
Dim a, b, c As Double
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox4.Text = ""
TextBox6.Text = ""
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
a = Val(TextBox6.Text)
If a < 51 And a > 0 Then
b = a * 0.5
c = (b * 20 / 100) + b
TextBox4.Text = c
ElseIf a > 50 And a < 151 Then
b = a * 0.75
c = (b * 20 / 100) + b
TextBox4.Text = c
ElseIf a > 150 And a < 251 Then
b = a * 1.2
c = (b * 20 / 100) + b
TextBox4.Text = c
ElseIf a > 250 Then
b = a * 1.5
c = (b * 20 / 100) + b
TextBox4.Text = c
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Close()
End Sub
End Class
OUTPUT:-

You might also like