0% found this document useful (0 votes)
56 views3 pages

Class Sample

This document describes using a class in Visual Basic .NET to analyze student exam results. The class contains functions to input student name, roll number and marks, process the marks to determine if the student passed or failed based on minimum marks in each subject, and output the student details along with the total, average and result. The main module creates an instance of the class and calls the input, processing and output functions to display the analysis for one student.

Uploaded by

malonan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views3 pages

Class Sample

This document describes using a class in Visual Basic .NET to analyze student exam results. The class contains functions to input student name, roll number and marks, process the marks to determine if the student passed or failed based on minimum marks in each subject, and output the student details along with the total, average and result. The main module creates an instance of the class and calls the input, processing and output functions to display the analysis for one student.

Uploaded by

malonan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Result Analysis Using Class

Aim:
To find the Result Analysis Using Class using visual basic .net console
application

Coding:

Class sample
Dim name, result As String
Dim rollno, total As Integer
Dim eng, tam, mat As Integer
Dim tmark, avg As Integer
Dim check As Integer

Function input()
Console.WriteLine("enter the name")
name = Console.ReadLine
Console.WriteLine("enter the rollno")
rollno = Console.ReadLine
Console.WriteLine("enter the 3 marks")
eng = Console.ReadLine
tam = Console.ReadLine
mat = Console.ReadLine
Return (0)
End Function

Function processing()
If (eng >= 35 And tam >= 35 And mat >= 35) Then
check = 1
Else
check = 0
End If
Select Case check
Case 0
result = "fail"
Case 1
result = "pass"
End Select
End Function

Function output()
check = 0
Console.WriteLine("name={0}", name)
tmark = eng + tam + mat
avg = tmark / 3
Console.WriteLine("rollno={0}\n and total={1} and average={2},result={3}",
rollno, tmark, avg, result)
Return (0)
End Function
End Class

Module module1
Sub Main()
Dim s As New sample()
s.input()
s.processing()
s.output()
Console.Read()
End Sub
End Module

Output:

You might also like