GAD - Program (1) (AutoRecovered)
GAD - Program (1) (AutoRecovered)
7. Write a program using While statement to print even-odd numbers between 1-50
8. Write a program using For & For Each statement
9. Write a program using For Next loop statement to find the Armstrong numbers between 1 to
500(153 is Armstrong number 13 +53 +33 =153)
10. Write a program to change the background color of the form when user clicks on different
button.
11. Write a program using Radio button to change the bulb state ON/OFF (Use two images one for
ON state and another for Off State)
12. Write a program to change the forecolor of the text in Label (Use different radio buttons for
colors i.e. Red, Green, Blue
13. Implement a program for student registration which will allow the student to register for
multiple subjects for single semester using List & Combo box.
14. Write a program to display the traffic signal using timer control
15. Write a program code perform the date Validation using ErrorProvider Control
16. Write a Program using ErrorProivider for username & password authentication
17. Write a Program using ErrorProvider control to validate the Mobile Number and Email ID in GUI
application
18. Write a Program using sub procedure & parameterized sub procedures.
19. Develop a program to print the reverse of any number using Sub Procedure.
21. Write a program to identify Volume of Box class, with three data members, length, breadth and
height
22. Implement a program to accept values from combobox and display average of this in message
box using a class.
24. Implement a Program for inheritance where Student is Child class and faculty is Base class.
(Take Appropriate variables in Base and child class)
Module Module1
Class faculty
Public name As String
Public subject As String
Public Sub getdata()
Console.WriteLine("Enter the name")
name = Console.ReadLine()
Console.WriteLine("Enter the Sub")
subject = Console.ReadLine()
End Sub
End Class
Class student
Inherits faculty
Dim s_name As String
Dim s_roll As Integer
Sub accept()
Console.WriteLine("Enter the name of the student")
s_name = Console.ReadLine()
Console.WriteLine("Enter the Roll of the student")
s_roll = Console.ReadLine()
End Sub
Sub display()
Console.WriteLine("The name of the faculty is " & name)
Console.WriteLine("The subject is:" & subject)
Console.WriteLine("The name of the Student is" & s_name)
Console.WriteLine("The roll no of the student is " & s_roll)
End Sub
End Class
Sub Main()
Dim s1 As student = New student
s1.getdata()
s1.accept()
s1.display()
Console.ReadLine()
End Sub
End Module
25. Write a program to implement the concept of method overloading & overriding
Module Module1
Class Animal
' Method to make the animal sound
Overridable Sub MakeSound()
Console.WriteLine("The animal makes a generic sound.")
End Sub
Class Dog
Inherits Animal
Sub Main()
Dim animal As New Animal()
Dim dog As New Dog()
Console.ReadLine()
End Sub
End Module
Module Module1
Dim name As String
Dim rollno As Integer
Dim per As Double
Dim ch As Boolean
Sub Form()
Console.WriteLine("Fill Registration Form: ")
Console.WriteLine("Enter name , rollno and percentage:")
name = Console.ReadLine()
rollno = Console.ReadLine()
per = Console.ReadLine()
End Sub
Sub Main()
Module1.Form()
Try
ch = per > 0 And per < 100
If ch Then
Console.WriteLine("Form Filled Sucessfully")
Else
Throw New Exception("Invalid-Range")
End If
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Console.ReadKey()
End Sub
End Module