0% found this document useful (0 votes)
3 views1 page

c#

The document contains a C# class named 'Student' that manages student information including name, attendance, internal assessment, and subject marks. It includes methods to check exam eligibility based on attendance and internal assessment criteria, as well as to print a detailed mark list. The class is structured to facilitate easy management and display of student academic data.

Uploaded by

lhemachandran908
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)
3 views1 page

c#

The document contains a C# class named 'Student' that manages student information including name, attendance, internal assessment, and subject marks. It includes methods to check exam eligibility based on attendance and internal assessment criteria, as well as to print a detailed mark list. The class is structured to facilitate easy management and display of student academic data.

Uploaded by

lhemachandran908
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/ 1

using System;

class Student
{
public string Name;
public double Attendance;
public double InternalAssessment;
public int[] Marks; // Array to store subject marks
public string[] Subjects = { "Math", "Science", "English", "History", "Computer" };

public Student(string name, double attendance, double internalAssessment, int[] marks)


{
Name = name;
Attendance = attendance;
InternalAssessment = internalAssessment;
Marks = marks;
}

public void CheckEligibility()


{
if (InternalAssessment < 40)
Console.WriteLine("Not Allowed for Exam (Low Internal Assessment)");
else if (Attendance < 75)
Console.WriteLine("Not Allowed for Exam (Low Attendance)");
else
Console.WriteLine("Allowed for Exam");
}

public void PrintMarkList()


{
Console.WriteLine("\nStudent Mark List:");
Console.WriteLine("----------------------------");
Console.WriteLine("Name: " + Name);
Console.WriteLine("Attendance: " + Attendance + "%");
Console.WriteLine("Internal Assessment: " + InternalAssessment);
Console.WriteLine("\nSubject-wise Marks:");
for (int i = 0; i < Subjects.Length; i++)
{
Console.WriteLine(Subjects[i] + ": " + Marks[i]);
}
Console.Write

You might also like