preview

The Four Principles Of Object Oriented Programming

Decent Essays

COS20007 Object Oriented Programming Pass Task 13 – Principles of Object Oriented Programming Student Name: Damon Koo Ka Poh Student ID: 100076771 Year: 1 Semester: 2 Lecturer: Mr. Ong Chin Ann Principle of Object Oriented Programming There are four major principles for Object Oriented Programming which are Encapsulation, Abstraction, Inheritance and Polymorphism. These principles are useful for programmers to manage their coding and work easily by breaking down to small pieces, using superclass and subclass, hiding data and all others stuff. These principles are important for especially big project of programs, or complex and complicated program that required often maintenance and changes. Encapsulation Encapsulation is to protect or …show more content…

This is abstraction principle. Inheritance Inheritance mean receiving members from the parent class, a way allowing us to reuse the pre-written code from parent classes. It is a relationship between classes. This help programmers to save time while coding. In inheritance, there are subclass and superclass. Subclass is the child class and superclass is the parent class. public class Rectangle

Get Access