Skip to content

A program using the concept of inheritance to make distinctive output for different students of a university based on detailed information.

Notifications You must be signed in to change notification settings

MSH-trojan/Java_21_Inheritance_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Description

This Java program demonstrates basic inheritance and object-oriented programming concepts through a simple student management system. It includes two classes: Student and Undergrad.

Student Class: Represents a student with name and number attributes, with methods to get and set these values. It also provides a toString method for displaying the student's details.

Undergrad Class: Inherits from Student and adds major and year attributes specific to undergraduate students. It overrides the toString method to include these additional details.

Main Class (Inh_1): The entry point of the program, where instances of Student and Undergrad are created, modified, and displayed, showcasing inheritance and method overriding.

This program is a simple demonstration of inheritance, encapsulation, and method overriding in Java.

About

A program using the concept of inheritance to make distinctive output for different students of a university based on detailed information.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages