Question

Write a java program to create an abstract class Student. Inherit UG_Student class and PG_Student class from the Student class. Define constructors and appropriate methods to display details of students. Make necessary assumptions.

01 Dec 2023
Answer :
Word Count : 738

JAVA PROGRAM:-

// Abstract class Student
abstract class Student {
    private String name;
    private int age;
    private String studentID;

    // Constructor for Student class
    public Student(String name, int age, String studentID) {
        this.name = name;
        this.age = age;
        this.studentID = studentID;
    }

    // Getter methods
    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public String getStudentID() {
        return studentID;
    }

    // Abstract method to display details
    public abstract void displayDetails();
_________ ___ ___ _______ ___ ________.
__________ ________ ____ ________ ________ _______ __________.
____ ____ ___ __________ ____ ____.
________ _____ _______ ___ ______.
______ ______ ___ _______ ______ ___ _____ ________.
_______ _____ _____ ____ ____ ____ ______ _____.
_______ ______ __________ __________ ___.
___ ________ _________ ________ _____ _________ __________ ________ _____ _____ _________ ________.
___ ___ ___ ________ ____ __________ ____ ________ _____ _______.
_________ _________ ______ ___ ___ __________ ______ _________ __________ _________ ___.
_______ ___ _____ ___ __________ ___ _________ ________ ___ ___.
_________ ____ _____ _____ ___ _____ _________ ________ ____.
______ _______ __________ _________ _____ _________ ________ ________ ______ _____ ____ ______.
________ ___ ____ _____ _________ ______ _____ ______ __________ _________ __________ _________.
________ ________ __________ ____ ________ _________ _____.
_____ _____ __________ ____ ______ ________ ________ __________.
_____ ____ ___ ________ _________ _______ __________ _______ ______.
______ ____ ______ ______ __________ ______ _________ __________ _________ __________ ________.
_______ ________ __________ _________ ________ ___ ______ _______ _________ ___ ______ ________.
____ ______ ___ ______ _______ _______ ______ ___ ___.
__________ _____ ___ ______ ________ _____.
___ ____ ________ ___ _________ ____.
__________ _____ __________ ______ _____ ______ ________ ________ ___ ___ __________ __________.
_____ ______ _______ ______ ________ _______ ___ ________.
____ _________ ____ _____ _____ __________.
___ ______ __________ _____ __________ ___ ____ ______ ______ ______ ____.
_________ ____ _____ ___ __________ ____ ___ ________ ___ _______ _______.
_____ _________ ____ _________ _______ _____.
_____ ________ __________ ___ _____.
_______ _______ _________ ______ ____ ________ ____ _______ ____.
__________ _______ ____ _____ ___ _______ _________ ______ __________ _____ ___.
_______ ________ _________ _________ ___ ____ ______ _________ __________ _____ _______ ______.
_____ __________ _________ ________ _________ ________.
______ ________ ______ _______ __________ ___.
_____ __________ _________ _____ __________ __________ ___ ____ ________.
_____ _______ ____ _____ _____ __________ ____ ________ ________ _______ ________.
__________ ________ _____ ____ _____ __________ _______ ___ _______ ____ ______ _________.
________ ________ ____ _____ _______ __________.
__________ ______ _______ ___ ___ ___ ____ __________ ____ ________ ___.
_____ ____ __________ ______ __________ _________ _______.
_______ __________ __________ __________ __________ ___ ____ ____ _______ ___ _______.
_______ __________ __________ ____ ___ _______ ________ _______ ______.
____ _________ __________ ____ ___ _______ ___ ________.
______ _________ ____ ________ _______ ___ _____ _________ _______.
_________ ________ ____ ________ _______ ________ ______ ______.
_____ ___ ______ _______ __________ _____ ______ _______.
_____ _____ ___ ________ __________ _______ ______ ______ _____ _________ _____ ____.
___ ___ ______ _________ ________ ______ __________ __________ __________ _________ ______.
_______ _____ __________ ________ _____ ____ _________ _____ ______.
____ _______ _____ ____ ________ _____ _____ __________ ________ ______.
_________ ________ _____ _______ _________ ________ ___.
__________ ______ ________ _______ __________ _________ _____ _____ __________.
_____ ________ _______ ________ _____ _______.
________ ____ __________ _______ _____ ________.
_________ _____ _____ ____ _________ ________ _______ ____ ______.
________ _____ ____ __________ _____ ________.
______ _____ _________ ____ _______ __________ _______ _____ _________ _____ __________.
__________ ______ ________ _______ ________ ____.
_______ ____ ______ _____ __________.
___ ___ ______ _____ _____ _____ __________ __________ ________.
___ ________ _______ ________ _________ _____ ____ _______ ________ ________ _________.
____ _______ _____ ________ ___.
______ __________ _________ ______ ____ _____ ________ ____.
__________ ______ ______ ________ __________ _____.
_______ ____ ______ __________ _____ ___ ______ ___ _______ _________ _____.
______ ________ __________ __________ ________ _____ _________ ______ ________ _________.
____ ___ _________ ______ _______ ____ __________.
_________ _____ ___ __________ _____ ________.
Get Full Answer on WhatsApp

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Write a java program to create an abstract class Student. Inherit UG_S
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support