You are on page 1of 48

An

ASSIGNMENT
ON

DOT NET TECHNOLOGY

BACHELORS OF COMPUTER APPLICATIONS


FROM

Pt. Ravishanker Shukla University Raipur( C . G )


Third Year

Year : 2022 - 2023

Guided by Submitted by
Mrs. KAVITA BHARTI LAKSHYA PATEL
CLASS – BCA lll

Submitted to
Durga College
Pt. Ravishanker Shukla University Raipur ( C . G )
ACKNOWLEDGEMENT

No work can be completed successfully without the help ,


inspiration and encouragement by the elders and seniors .
So my heartily thanks to all of them who helped me while
preparing this assignment . I woulsd begin by thanking to
my parents who provided me the required support for
completing this job .

I Acknowledge and thanks for the help received from


Mrs. KAVITA BHARTI our “ Assignment In Charge “ and
classmates who guided me to complete this assignment .
CERTIFICATE OF APPROVAL

This is to certify that the Assignment work on “DOT NET


TECHNOLOGY” is carried out by LAKSHYA PATEL a student of
BCA-III YEAR at DURGA COLLEGE is hereby approved as a
credible work in the discipline of Visual Basic.Net for the
award of degree of BCA – III YEAR during the year 2022-23
from Pt.Ravishanker Shukla University , Raipur( C . G ) .

Mrs. Kavita Bharti


( Asst. Professor )
Durga College
Raipur ( C . G )
CERTIFICATE OF EVALUATION
This is to certify that Project work entitled is “DOT NET
TECHNOLOGY” Carried out by LAKSHYA PATEL a student of
BCA – III YEAR at Durga College , Raipur after proper
evaluation and wxamination , is here by approved as a
credible work in the discipline of Visual Basic.Net and is done.
In a satisfactory manner for its acceptence as a requisite for
the award of degree of “ BCA – III YEAR “ during the year
2022 – 2023 from Pt. Ravishanker Shukla University ,
Raipur ( C . G ) .
INDEX
S.No Name of Program Page No. Remark
.
1 Write a program to find maximum between three
numbers.
2 Write a program to check whether number is
negative , Positive or Zero.
3 Write a Program to check whether a year is leap
year or not
4 Design an application to input marks of five
subjects Physics , Chemistry , Biology ,
Mathematics and Computer . Calculate percentage
and grade according to following :
Percentage >= 90% : Grade A
Percentage >= 80% : Grade B
Percentage >= 70% : Grade C
Percentage >= 60% : Grade D
Percentage >= 40% : Grade E
Percentage < 40% : Grade F
5 . Design an Application to input basic salary of an
employee and calculate its Gross salary according
to following :
Basic Salary <= 10000 : HRA = 20% , DA =
80%
Basic Salary <= 20000 : HRA = 25% , DA =
90%
Basic Salary <= 20000 : HRA = 30% , DA = 95%
6 Write a program to swap two numbers using
bitwise operator
7 Write a program to create Simple Calculator using
select case .
8 Write a Program to find sum of all natural numbers
between 1 to n.
9 Write a program to find first and last digit of any
number .
10 Write a program to enter any number and print its
reverse .
11 Write a program to enter any number and check
whether the number is palindrome or not.
12 Write a program to check whether a
number is Armstrong number or not.
13 Write a program to print Pascal
Triangle upto n rows.
14 Design a digital clock using timer
control.
15 Design an application that accepts the
item name from the user and add it to
a listbox and combobox.
16 WAP for temperature conversion using
radiobutton.
17 WAP to launch a rocket using
PictureBox and Timer Control.
18 WAP to change the back color of any
control using scrollbar
19 WAP to check whether a given number is
neon or not.
20 WAP to check whether a given number is
duck number or not.
21 Design the following application using
radiobutton and checkbox.
22 Design an application to create the
Payroll form shown below. Number of
hours must be entered as well as the
appropriate rate.
Gross Salary = Rate * Hours
Net Salary = Gross Salary – Deductions
23 Design an application for facilitating
purchasing order.
24 Develop an application for billing
system in coffee shop.
25 Develop an application which is
similar to login form.
Q1. Write a program to find maximum between three numbers.

Design :-

Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim a As Integer
Dim b As Integer
Dim c As Integer

a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
c = Val(TextBox3.Text)

If a > b And a > c Then


Label4.Text = a & " is Greater "
ElseIf b > a And b > c Then
Label4.Text = b & " is Greater "
ElseIf c > a And c > b Then
Label4.Text = c & " is Greater "
End If

End Sub
End Class

Output :-

Q2. Write a program to check whether number is negative , Positive or Zero.

Design :-

Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim a As Integer = 1
a = Val(TextBox1.Text)
If 0 < a Then
Label1.Text = " Positive Number "
ElseIf 0 > a Then
Label1.Text = " Negative Number "
ElseIf 0 = 0 Then
Label1.Text = " Integer / Zero "
End If

End Sub
End Class

Outputs :-
Q3. Write a Program to check whether a year is leap year or not.

Design :-

Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim L As Integer

L = Val(TextBox1.Text)

If L Mod 100 = 0 Then


If L Mod 400 = 0 Then
Label1.Text = " The Given Year " & L & " is Leap Year. "
Else
Label1.Text = " The Given Year " & L & " is Not Leap Year. "
End If
Else
If L Mod 4 = 0 Then
Label1.Text = " The Given Year " & L & " is Leap Year. "
Else
Label1.Text = " The Given Year " & L & " is Not Leap Year. "
End If
End If

End Sub
End Class
Outputs :-

Q4. Design an application to input marks of five subjects Physics , Chemistry ,


Biology , Mathematics and Computer . Calculate percentage and grade according
to following :

Percentage >= 90% : Grade A


Percentage >= 80% : Grade B
Percentage >= 70% : Grade C
Percentage >= 60% : Grade D
Percentage >= 40% : Grade E
Percentage < 40% : Grade F
Design :-

Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim Phy, Chem, Bio, Maths, Comp As Integer


Dim Per As Single

Phy = Val(TextBox1.Text)
Chem = Val(TextBox2.Text)
Bio = Val(TextBox3.Text)
Maths = Val(TextBox4.Text)
Comp = Val(TextBox5.Text)

Per = (Phy + Chem + Bio + Maths + Comp) / 5


TextBox7.Text = Per & " % "

If Per >= 90 Then


TextBox6.Text = " A "
ElseIf Per >= 80 Then
TextBox6.Text = " B "
ElseIf Per >= 70 Then
TextBox6.Text = " C "
ElseIf Per >= 60 Then
TextBox6.Text = " D "
ElseIf Per >= 40 Then
TextBox6.Text = " E "
ElseIf Per < 40 Then
TextBox6.Text = " F "
End If
End Sub
End Class
Output :-

Q5. Design an Application to input basic salary of an employee and calculate its
Gross salary according to following :

Basic Salary <= 10000 : HRA = 20% , DA = 80%


Basic Salary <= 20000 : HRA = 25% , DA = 90%
Basic Salary <= 20000 : HRA = 30% , DA = 95%

Design :-
Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim sal As Integer


Dim da As Integer
Dim hra As Integer
Dim gs As Integer

sal = Val(TextBox1.Text)

If sal <= 10000 Then


da = 80 * sal / 100
hra = 20 * sal / 100
ElseIf sal <= 20000 Then
da = 90 * sal / 100
hra = 25 * sal / 100
Else
da = 95 * sal / 100
hra = 30 * sal / 100
End If

gs = sal + da + hra

TextBox2.Text = da
TextBox3.Text = hra
TextBox4.Text = gs
End Sub
End Class

Output :-

Q6. Write a program to swap two numbers using bitwise operator .

Design :-

Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim x, y As Integer

x = Val(TextBox1.Text)
y = Val(TextBox2.Text)

x = x Xor y
y = x Xor y
x = x Xor y

Label3.Text = " X Value is " & x


Label4.Text = " Y Value is " & y

End Sub
End Class

Output :-

Q7. Write a program to create Simple Calculator using select case .

Design :-
Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim a, b As Integer
Dim Sign As String
Dim Cal As Single

a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
Sign = Val(TextBox3.Text)

Select Case Sign


Case 1
Cal = a + b
Case 2
Cal = a - b
Case 3
Cal = a * b
Case 4
Cal = a / b
Case Else
MessageBox.Show(" Invalid Sign ")
End Select

TextBox4.Text = Cal

End Sub
End Class

Outputs :-
Q8. Write a Program to find sum of all natural numbers between 1 to n.

Design :-

Code :-
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim n, sum As Integer

n = Val(TextBox1.Text)

sum = (n * (n + 1)) / 2

TextBox2.Text = sum

End Sub
End Class

Output :-

Q9. Write a program to find first and last digit of any number .

Design :-
Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim n, First, Last As Integer

n = Val(TextBox1.Text)
First = n

While First >= 10

First = First / 10

End While

Last = n Mod 10

TextBox2.Text = First
TextBox3.Text = Last

End Sub
End Class

Output :-
Q10. Write a program to enter any number and print its reverse .

Design :-

Code :-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim n, a As Integer
Dim length As Integer

n = CInt(TextBox1.Text)
length = TextBox1.TextLength

For i = 1 To length
a = n Mod 10
n = n \ 10
TextBox2.Text = TextBox2.Text & a
Next

End Sub
End Class

Output :-

Q11. Write a program to enter any number and check whether the number is
palindrome or not.

Design:-

Code:-
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim n
Dim r
Dim sum = 0
Dim temp

n = Val(TextBox1.Text)
temp = n

While (n > 0)
r = n Mod 10
sum = sum * 10 + r
n = Math.Floor(n / 10)
End While

If temp = sum Then


Label2.Text = " It is Palindrome Number"
Else
Label2.Text = " It is not Palindrome Number "
End If

End Sub
End Class

Outputs:-
Q12. Write a program to check whether a number is Armstrong
number or not.

Design:-

Code:-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Dim n As Integer
Dim r As Integer
Dim sum As Integer
Dim t As Integer

n = Val(TextBox1.Text)

sum = 0
t = n

While n > 0
r = n Mod 10
sum = sum + r ^ 3
n = n \ 10
End While

If sum = t Then
Label1.Text = "It is Armstrong Number "
Else
Label1.Text = "It is not Armstrong Number "
End If

End Sub
End Class

Outputs:-

Q13. Write a program to print Pascal Triangle upto n rows.

Design:-

Code:-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim x, y, z As Integer

x = 1
y = Val(TextBox1.Text)
y = y + 2

Do Until x >= y
z = 1
TextBox2.Text = TextBox2.Text & Space(y - x)
Do Until z >= x
TextBox2.Text = TextBox2.Text & " " & "*" & " " & " "
z += 1
Loop
TextBox2.Text = TextBox2.Text & vbCrLf
x += 1
Loop

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click

TextBox2.Clear()

End Sub
End Class

Output:-

Q14. Design a digital clock using timer control.


Design:-

Code:-

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

Timer1.Enabled = True

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick

Label1.Text = Date.Now.ToString(" hh : mm : ss ")

End Sub
End Class

Output:-
Q15. Design an application that accepts the item name from
the user and add it to a listbox and combobox.

Design:-

Code:-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text)
ComboBox1.Items.Add(TextBox1.Text)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
End
End Sub
End Class

Output:-

Q16. WAP for temperature conversion using radiobutton.

Design:-

Code:-
Public Class Form1

Dim t As Integer

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles RadioButton1.CheckedChanged

Dim c As Single

t = Val(TextBox1.Text)
c = (t * 9 / 5) + 32
TextBox2.Text = c

End Sub

Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles RadioButton2.CheckedChanged

Dim f As Single

t = Val(TextBox1.Text)
f = (t - 32) * 5 / 9
TextBox2.Text = f

End Sub
End Class

Outputs:-
Q17. WAP to launch a rocket using PictureBox and Timer
Control.

Design:-

Code:-

Public Class Form1

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick

PictureBox1.Top = PictureBox1.Top - 1

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Timer1.Enabled = True

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click

Timer1.Enabled = False

End Sub
End Class

Output:-
Q18. WAP to change the back color of any control using
scrollbar.

Design:-
Code:-
Public Class Form1

Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll,
HScrollBar2.Scroll, HScrollBar3.Scroll

Label4.BackColor = Color.FromArgb(HScrollBar1.Value, HScrollBar2.Value,


HScrollBar3.Value)

End Sub
End Class

Outputs:-

Red: Green:

Blue: Purple:

Q19. WAP to check whether a given number is neon or not.


Design:-

Code:-

Public Class Form1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim n As Integer
Dim sqr As Integer
Dim sum As Integer

n = Val(TextBox1.Text)
sqr = n * n

While (sqr > 0)


sum = sum + sqr Mod 10
sqr = sqr \ 10
End While

If sum = n Then
Label2.Text = " It is a Neon Number "
Else
Label2.Text = " It is not a Neon Number "
End If
End Sub
End Class

Outputs:-
Q20. WAP to check whether a given number is duck number or
not.

Design:-

Code:-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim n As Integer
Dim i As Integer
Dim r As Integer

n = Val(TextBox1.Text)
r = 0

While n <> 0
i = n Mod 10
If i = 0 Then
r = r + 1
End If
n = n \ 10
End While

If r >= 1 Then
Label2.Text = " It is duck number "
Else
Label2.Text = " It is not duck number "
End If

End Sub
End Class

Outputs:-
Q21. Design the following application using radiobutton and
checkbox.

Design:-

Code:-

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Dim pr
Dim os
Dim ac1, ac2, ac3, ac4
If RadioButton1.Checked = True Then
pr = " Platinum "
ElseIf RadioButton2.Checked = True Then
pr = " Platinum ll "
Else
pr = " Platinum lll "
End If

If RadioButton4.Checked = True Then


os = " Windows 98 "
Else
os = " Windows NT "
End If

If CheckBox1.Checked = True Then


ac1 = " Printer "
Else
ac1 = ""
End If
If CheckBox2.Checked = True Then
ac2 = " Modem "
Else
ac2 = ""
End If
If CheckBox3.Checked = True Then
ac3 = " Monitor "
Else
ac3 = ""
End If
If CheckBox4.Checked = True Then
ac4 = " NIC "
Else
ac4 = ""
End If

Label2.Text = " You Selected a " & pr & " with " & os & " And Accesories : " &
ac1 & ac2 & ac3 & ac4
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click

RadioButton1.Checked = False
RadioButton2.Checked = False
RadioButton3.Checked = False
RadioButton4.Checked = False
RadioButton5.Checked = False

CheckBox1.Checked = False
CheckBox2.Checked = False
CheckBox3.Checked = False
CheckBox4.Checked = False

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

Output:-

Q22. Design an application to create the Payroll form shown


below. Number of hours must be entered as well as the
appropriate rate.
Gross Salary = Rate * Hours
Net Salary = Gross Salary – Deductions
Design:-

Code:-

Public Class Form1

Dim hw As Single
Dim da As Single
Dim R As Single
Dim gs As Single
Dim ns As Single

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click

hw = Val(TextBox2.Text)
da = Val(TextBox3.Text)

If RadioButton1.Checked = True Then


R = 10.0
ElseIf RadioButton2.Checked = True Then
R = 12.5
ElseIf RadioButton3.Checked = True Then
R = 15.0
End If
gs = R * hw
TextBox4.Text = " $ " & gs
ns = gs - da
TextBox5.Text = " $ " & ns

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

RadioButton1.Checked = False
RadioButton2.Checked = False
RadioButton3.Checked = False

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click

End

End Sub
End Class

Output:-
Q23. Design an application for facilitating purchasing order.

Design:-

Code:-

Public Class Form1

Dim a As Integer
Dim b As Integer
Dim c As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load

ComboBox1.Items.Add("Honda Civic LX ")


ComboBox1.Items.Add("Honda Civic EX ")
ComboBox1.Items.Add("Honda Civic Touring ")
ComboBox1.Items.Add("Honda Civic Sport Touring")

ComboBox2.Items.Add("Black")
ComboBox2.Items.Add("White")

ListBox1.Items.Add("Sedan")
ListBox1.Items.Add("Hatch Back")

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click

If ComboBox1.SelectedItem.ToString() = "Honda Civic LX " Then


a = 300000
ElseIf ComboBox1.SelectedItem.ToString() = "Honda Civic EX " Then
a = 320000
ElseIf ComboBox1.SelectedItem.ToString() = "Honda Civic Touring " Then
a = 350000
ElseIf ComboBox1.SelectedItem.ToString() = "Honda Civic Sport Touring" Then
a = 400000
End If

If ComboBox2.SelectedItem.ToString() = "Black" Then


b = 30000
ElseIf ComboBox2.SelectedItem.ToString() = "White" Then
b = 20000
End If

If ListBox1.SelectedItem.ToString() = "Sedan" Then


c = 100000
ElseIf ListBox1.SelectedItem.ToString() = "Hatch Back" Then
c = 200000
End If

TextBox1.Text = a + b + c

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click

TextBox1.Text = ""

End Sub
End Class
Output:-

Q24. Develop an application for billing system in coffee


shop.

Design:-
Code:-

Public Class Form1


Dim T
Dim C
Dim Rt, Rc
Dim tc, cc
Dim Total
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

T = Val(TextBox1.Text)
C = Val(TextBox2.Text)

Rt = 20
Rc = 30

If CheckBox1.Checked = True Then


tc = 10
End If
If CheckBox2.Checked = True Then
cc = 15
End If

If RadioButton2.Checked = True Then


MsgBox("Please Enter the Card No.")
End If

Total = T * (Rt + tc) + C * (Rc + cc)


TextBox4.Text = Total

End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Outputs:-

Q25. Develop an application which is similar to login form.


Design:-

Code:-
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim user As String
Dim pass As String

user = TextBox1.Text
pass = TextBox2.Text

If (user.Equals("admin") And pass.Equals("admin")) Then


TextBox3.Text = " Login Succesfully "
Else
TextBox3.Text = " Error "
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
End Sub
End Class
Outputs:-

You might also like