Create a program that exhibits inheritance. Procedure:
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
People in School
Objective:
At the end of the activity, the students should be able to:
- Create a
program that exhibits inheritance.
Procedure:
- Write a simple
information system that will store and display the complete information of a student, faculty, or employee. - Create four (4) no-modifier classes named Person, Student, Faculty, and Employee.
- Create a public class named CollegeList. This class shall contain the main method.
- Refer to the UML Class Diagram for the names of the variables and methods. The (-) symbol represents private variables, while (+) represents public method. This should be the sequence of the program upon execution:
-
- Prompt the user to select among Employee, Faculty, or Student, by pressing E, F, or S.
- Ask the user to type the name and contact
- For Employee, ask the user to type the employee's monthly salary and the department where he/she belongs to (Ex. Registrar). Then, display name, contact number, salary, and
-
For Faculty, ask the user to press Y if the faculty member is regular/tenured or N if not. Then, display name, contact number, salary, department, and status.
For Student, ask the user to type the student's enrolled program (Ex. BSIT, BSTM) and his/her year level (integers 1 to 4). Then, display name, contact number, program, and year level.


Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images









