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 booleaneligible()
{
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

ISC Practical 2027: College Enrolment Code Validator and Stream Report – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 question: validate college enrolment codes made of a stream, year and serial number, give the exact reason for each rejection, auto-correct lowercase streams and prepare a stream-wise report.

ISC Practical 2027: Digital Lock Security Code Analyzer – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 number-logic question: for a 5 to 10 digit security code, find the first and last digits, odd and even position sums, product of non-zero digits, digit frequency and classify the code as STRONG, MODERATE or WEAK.

Boolean Algebra for ISC Class 12: Laws, Canonical SOP and POS, and Simplification
ISC Class 12 Computer Science notes on Boolean algebra: all the laws and theorems, duality, De Morgan's laws, minterms and maxterms, converting to canonical SOP and POS, and step-by-step algebraic simplification with solved examples.