Assignmant Bca
Assignmant Bca
1. Write a program to find the area of a box(Length* breadth *height ) using class
End Sub
End Class
OUTPUT
2. Write a program to perform following operation:
(ADD, SUBTRACT, MULTIPLY, DIVISION, MOD)
Public Class Form1
End Sub
End Sub
End Sub
End Sub
Return n Else
End Function
While (n >= 0)
End While
Module Module1
Sub Main()
Dim m, n, c, d As Int16
Dim first(,) As Int16 = New Int16(5, 5) {} Dim second(,) As Int16 = New Int16(5, 5) {} Dim
sum(,) As Int16 = New Int16(5, 5) {}
Console.WriteLine("Enter the number of rows and columns of matrix") m =
Convert.ToInt16(Console.ReadLine())
n = Convert.ToInt16(Console.ReadLine()) Console.WriteLine("\nEnter the elements of first
matrix\n") c = 0
While c < m d = 0
While d < n
Console.WriteLine("Enter Element [" + c.ToString() + " , " + d.ToString() + "]") first(c,
d) = Convert.ToInt16(Console.ReadLine())
d = d + 1 End While c = c + 1
End While
Console.WriteLine("Enter the elements of second matrix") c = 0
While c < m d = 0
While d < n
Console.WriteLine("Enter Element [" + c.ToString() + " , " + d.ToString() +second(c, d)
= Convert.ToInt16(Console.ReadLine()) d = d + 1
End While c = c + 1
End While c = 0
While c < m d = 0
While d < n
sum(c, d) = first(c, d) + second(c, d) d = d + 1
End While c = c + 1
End While
Console.WriteLine("Sum of entered matrices:-") c = 0
While c < m d = 0
While d < n
Console.Write(" " + sum(c, d).ToString()) d = d + 1
End While Console.WriteLine() c = c + 1
End While Console.ReadKey()
End Sub
End Module
OUTPUT
5. Create a list box, which contains names of all cinema halls of NCR. If you choose name of
cinema hall, label display information regarding all movies running in the cinema halls.
Simmba"
ElseIf (n = "Wave") Then TextBox1.Text = "URI
The accidental Prime Minister
KGF
NTR
Simmba"
End If
End Sub
End Class
OUTPUT
6. Create and validate login form.
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Form2.Hide()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End If
End Sub
TextBox2.UseSystemPasswordChar = False
Else
TextBox2.UseSystemPasswordChar = True
End If
End Sub
End Class
Public Class Form2
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Form1.Hide()
End Sub
hour = Val(TextBox2.Text)
basic = Val(TextBox1.Text)
overtime = Val(TextBox3.Text)
End Class
OUTPUT
8. Write a program to print first n square less than 50 and print the sum of the all the square
of the n number
Dim n As Integer = 1
Dim sum As Integer = 0
Dim x As String
While n * n < 50
x=n*n
sum += n * n
n += 1
TextBox1.Text += x + " "
End While
TextBox2.Text = sum
End Sub
End Class
OUTPUT
9. Create a project for book sales. Make text boxes for quantity, title and price with
labels.
Calculate total price, discount (15%) and discounted price.
Make command buttons for calculate, clear and exit.
End Sub
End Class
OUTPUT
10.Create a project for the local car rental agency that calculates rental charges..
Public Class Form1