Mobile Application Practical 20
Mobile Application Practical 20
console
Module Module1
Class person
Dim name As String
Dim city As String
Public Function get_person()
Console.WriteLine("Enter A Name of a Person")
Console.WriteLine("Enter A City of a person")
name = Console.ReadLine()
city = Console.ReadLine()
Return 0
End Function
Public Function show_person()
Console.WriteLine("Name of a Person " & name)
Console.WriteLine("City of a person " & city)
Return 0
End Function
End Class
Class employee
Inherits person
Dim sal As Double
Public Function get_emp()
Console.WriteLine("Enter A Salary of Employee")
sal = Console.ReadLine()
Return 0
End Function
Public Function show_emp()
Console.WriteLine("Salary Of the employee = {0}", sal)
Return 0
End Function
End Class
Sub Main()
Dim s As employee = New employee()
s.get_person()
s.get_emp()
s.show_person()
s.show_emp()
Console.ReadKey()
End Sub
End Module
Imports System.console
Module Module1
Dim str1 As String
Dim str2 As String
Dim str3 As String
Class signal
Public Function a_string()
Console.WriteLine("Enter The String: ")
Console.WriteLine("First String: ")
str1 = Console.ReadLine()
Return 0
End Function
End Class
Class concat
Inherits signal
Public Function b_string()
Console.WriteLine("Second String")
str2 = Console.ReadLine()
str3 = str1 + str2
Console.WriteLine("the Concatinate String is {0}", str3)
Return 0
End Function
End Class
Sub main()
Dim a As concat = New concat
a.a_string()
a.b_string()
Console.ReadKey()
End Sub
End Module