Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 4 - Coggle Diagram
Chapter 4
-
OO Software Engineering
OO Analysis
-
Definition: In the system analysis or object-oriented analysis phase of software development, the system requirements are determined, the classes are identified and the relationships among classes are identified.
OO Design
Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem
-
OO Programming
Encapsulation
Definition : Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates.
Access Modifiers
Definition : you can use to define the visibility of classes, methods, and attributes. Each of them specifies a different level of accessibility, and you can only use one modifier per class, method or attribute
Private
This is the most restrictive and most commonly used access modifier. If you use the private modifier with an attribute or method, it can only be accessed within the same class. Subclasses or any other classes within the same or a different package can’t access this attribute or method.
Default
When you don’t provide any access modifier for your attribute or method, you can access it within your class and from all classes within the same package.
Protected
Attributes and methods with the access modifier protected can be accessed within your class, by all classes within the same package, and by all subclasses within the same or other packages.
Public
This is the least restrictive access modifier. Methods and attributes that use the public modifier can be accessed within your current class and by all other classes.
Abstraction
abstract classes
Definition : Data abstraction is the process of hiding certain details and showing only essential information to the user.
Abstraction can be achieved with either abstract classes or interfaces (which you will learn more about in the next chapter). Keyword : abstract
Abstract class: is a restricted class that cannot be used to create objects (to access it, it must be inherited from another class).
Abstract method: can only be used in an abstract class, and it does not have a body. The body is provided by the subclass (inherited from).
Interface
Definition : The interface in Java is a mechanism to achieve abstraction. There can be only abstract methods in the Java interface, not method body. It is used to achieve abstraction and multiple inheritance in Java.
-
-
-
Inheritance
Definition : Inheritance is a mechanism in which one object acquires all the properties and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming system). Keyword : Extends
Type : single, multiple, multilevel, hierarchical, and hybrid
-
-
Polymorphism
-
Compile Time
Method overriding
is when a method defined in a superclass or interface is re-defined by one of its subclasses, thus modifying/replacing the behavior the superclass provides. The decision to call an implementation or another is dynamically taken at runtime, depending on the object the operation is called from.
Operator overloadding
refers to the ability of a certain language-dependant operator to behave differently based on the type of its operands
Run Time
Virtual functions
is a member function which is declared in the base class using the keyword virtual and is re-defined (Overriden) by the derived class ( the ability to take many forms )