Please enable JavaScript.
Coggle requires JavaScript to display documents.
IT OOP (Benefits of Databases (No redundant data, Data stored in a…
IT OOP
Information hiding
Information hiding is the ability to prevent certain aspects of a class or software component from being accessible to its clients
-
-
Encapsulation
-
3 specifiers of a class:
Public:can be used anywhere without access restrictions
Private:can only be used by members and friends of the class
Protected: can only be used by members and friends of a class and the members and friends of classes derived from the main class
Typed and Void methods
-
Typed methods specify the data type to be returned (i.e data will need to be stored in a variable or printed)
Inheritance
When the methods and attributes of a parent class are available to a Child class in order to create reusable code
•existing classes can be extended to include new methods
•existing code can be re-used; doesn't have to be rewritten to meet new requirements
•code can be extended even if source code isn't available
-
the difference between a class and an application is that an application is run from a main method while a class has a constructor method to instantiate the main method
-
-
Accessor: a typed method that returns the value of a private field in an object
Mutator: a method in OOP that changes the value of an object’s field
Constructor: the method which instantiates an object and assigns values to attributes of an object
Overloading: Methods in the same class which have the same name but different parameters
Overriding: When a method in the child and parent class have the same name and parameters (method in child class is invoked rather than parent class method)