Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Gramin Technical And Management Campus

Department Of Computer Engineering

Subject/code: GAD/22034
Name:suyash telang Batch: B Roll No:41
DOP: DOS:

Practical Related Question:


Q.2) Implement windows application for employee details using overriding method.
ModuleModule1
Sub Main()
Dim obj AsNewEmpInfo
obj.ShowInfo()
Console.ReadLine()
EndSub
EndModule
PublicClassEmpPersonalDetails
Dim name AsString
Dim address AsString
PublicOverridableFunction ShowInfo()
Console.WriteLine("Employee Name"& name)
Console.WriteLine("Employee Address"& address)
EndFunction
EndClass
PublicClassEmpInfo
InheritsEmpPersonalDetails
Dim EmpId AsInteger
Dim sallary AsInteger
Dim JoinDate AsDate
OverloadsFunction ShowInfo()
MyBase.ShowInfo()
Console.WriteLine("Employee ID"& EmpId)
Console.WriteLine("Employee Sallary"& sallary)
Console.WriteLine("Employee Joining Date"& JoinDate)
EndFunction
EndClass
Output:

Exercise:
Q.1)Implement a windows application for show string concatenation using overload method.
PublicClassForm2
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim str1, str2, str3 AsString
str1 = TextBox1.Text
str2 = TextBox2.Text
str3 = str1 + str2
TextBox3.Text = str3
EndSub
EndClass
Output:

You might also like