0% found this document useful (0 votes)
59 views

Android Practical 19

The document contains code for two classes - a Faculty class and a Student class. The Faculty class stores attributes like ID, name, destination and domain and has methods to get and put faculty data. The Student class inherits from Faculty and stores additional attributes like enroll, course. It has methods to get and put student data by calling the parent methods and also getting/putting the additional student attributes. The Main method creates a Student object and calls the get and put methods.

Uploaded by

Faiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Android Practical 19

The document contains code for two classes - a Faculty class and a Student class. The Faculty class stores attributes like ID, name, destination and domain and has methods to get and put faculty data. The Student class inherits from Faculty and stores additional attributes like enroll, course. It has methods to get and put student data by calling the parent methods and also getting/putting the additional student attributes. The Main method creates a Student object and calls the get and put methods.

Uploaded by

Faiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Practical No 19

Imports System.console
Module Module1
Public Class faculty
Dim id As Integer
Dim name As String
Dim destination As String
Dim domain As String
Public Function faculty_get()
Console.WriteLine("Enter The Informatopn of the faculty")
Console.WriteLine()
Console.WriteLine("Enter the faculty Id")
id = Console.ReadLine()
Console.WriteLine("Enter The Faculty Name")
name = Console.ReadLine()
Console.WriteLine("Enter The Faculty Destinatiopn")
destination = Console.ReadLine()
Console.WriteLine("Enter The Faculty Domain")
domain = Console.ReadLine()
Return 0
End Function
Public Function faculty_put()
Console.WriteLine("Faculty Data")
Console.WriteLine("Faculty: id " & id)
Console.WriteLine("Faculty Name " & name)
Console.WriteLine("Faculty Destination " & destination)
Console.WriteLine("Faculty Domain " & domain)
Return 0
End Function
End Class
Public Class Student
Inherits faculty
Dim enroll As Integer
Dim name As String
Dim course As String
Public Function Student_get()
Console.WriteLine("Enter The Informatopn of the Student")
Console.WriteLine()
Console.WriteLine("Enter the Student Enroll")
enroll = Console.ReadLine()
Console.WriteLine("Enter The Student Name")
name = Console.ReadLine()
Console.WriteLine("Enter The Student Course")
course = Console.ReadLine()
Return 0
End Function
Public Function Student_put()
Console.WriteLine("Faculty Data")
Console.WriteLine("Student: Enroll " & enroll)
Console.WriteLine("Student Name " & name)
Console.WriteLine("Student Course " & course)
Return 0
End Function
End Class
Sub Main()
Dim s As Student = New Student()
s.faculty_get()
s.Student_get()
s.faculty_put()
s.Student_put()
Console.ReadKey()
End Sub
End Module
Imports System.console
Module Module1
Class emplyee
Dim name, Projet As String
Public Overridable Function get_show()

Console.WriteLine("Enter The name: ")


name = Console.ReadLine()
Console.WriteLine("Enter The Project Name: ")
Projet = Console.ReadLine()
Console.WriteLine()
Console.WriteLine("********Employee Details ******")
Console.WriteLine("Name : {0} ", name)
Console.WriteLine("Project Name {0}", Projet)
Return 0
End Function
End Class
Class deveploper
Inherits emplyee
Dim domain As String
Public Overridable Function get_show()
MyBase.get_show()
Console.WriteLine("")
Console.WriteLine("Enter Domain Name: ")
domain = Console.ReadLine()
Console.WriteLine()
Console.WriteLine("************Developer Details")
Console.WriteLine("Domain Name: {0}", domain)
Return 0
End Function
Shared Sub Main()
Dim s As New deveploper
s.get_show()
Console.ReadKey()
End Sub
End Class
End Module

You might also like