0% found this document useful (0 votes)
46 views2 pages

Class Program

This document provides a simple class program in Visual Basic .NET to get student name, roll number, and marks in three subjects as input, calculate the total marks, and output the name, roll number, and total marks. It defines a class with variables to store the input data and functions for input, output, and calculation. The main module creates an instance of the class and calls the input and output functions.

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)
46 views2 pages

Class Program

This document provides a simple class program in Visual Basic .NET to get student name, roll number, and marks in three subjects as input, calculate the total marks, and output the name, roll number, and total marks. It defines a class with variables to store the input data and functions for input, output, and calculation. The main module creates an instance of the class and calls the input and output functions.

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/ 2

Simple Class Program

Aim:
To find the Simple class program using visual basic .net console application

Coding:
Public Class str1
Dim name As String
Dim rno As Integer
Dim tmark As Integer
Dim tam, mat, eng As Integer

Function input() As Integer


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

Function output() As Integer


tmark = tam + eng + mat
Console.WriteLine("name={0}", name)
Console.WriteLine("rollno={0}", rno)
Console.WriteLine("tmark={0}", tmark)
Return (0)
End Function
End Class

Module Module1
Sub Main()
Dim s As New str1()
s.input()
s.output()
Console.ReadLine()
End Sub
End Module
Output:

You might also like