Interface program
Write a java program to find the details of the students eligible to enroll for the examination ( Students, Department combinedly give the eligibility criteria for the enrollement class) using interfaces.
Interface program
JAVA videos
Write a java program to find the details of the students eligible to enroll for the examination ( Students, Department combinedly give the eligibility criteria for the enrollement class) using interfaces.
import java.util.Scanner;
interface Student
{
int studentID = 3;
String studentName = "ABC";
String Class = "CE" ;
void getValue();
}
class Department implements Student
{
int attendance;
public void getAttendance()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter Attendance: ");
attendance = sc.nextInt();
}
public void getValue()
{
System.out.println("ID :" + studentID + "\tName :" + studentName + "\tClass : " + Class);
}
}
class Exam extends Department
{
public void calculateAttendance()
{
attendance = attendance;
}
public boolean eligible()
{
if(attendance < 60)
return false;
else
return true;
}
}
public class Practical20
{
public static void main(String[] args)
{
Exam e = new Exam();
e.getValue();
e.getAttendance();
e.calculateAttendance();
System.out.println("Eligibility :" + e.eligible());
}
}Output:-
ID: 3
Name: ABC
Class: CE
Enter Attendance:82
Eligibility: true
Inheritance of interface
Related Posts
Continue learning with these related articles

Logic Gates for ISC Class 11: Truth Tables, Universal Gates, Half and Full Adder
ISC Class 11 Computer Science notes on logic gates: AND, OR, NOT, NAND, NOR, XOR and XNOR with truth tables, why NAND and NOR are universal gates, and half adder and full adder circuits with their Boolean expressions.
Decimal to Binary Conversion in Java: 3 Programs with Examples
How to convert a decimal number to binary on paper and in Java: three programs (String, place value and Integer.toBinaryString), binary to decimal, a dry run and common mistakes.

ISC Class 11 Computer Science Sample Paper 2026-27 with Solutions
A full 70-mark ISC Class 11 Computer Science sample paper for the 2026-27 annual exam: MCQs, number systems, propositional logic, logic gates, Java classes, arrays, strings, searching and sorting, and computing ethics, with complete worked solutions.