1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Procedural Programming
Programs that perform their behavior as a series of steps to be carried out. Procedural programming structures a program like a recipe in that it provides a set of steps, in the form of functions and code blocks, that flow sequentially in order to complete a task.
Object-oriented programming
Programs that perform their behavior as interactions among objects. Put another way, object-oriented programming is an approach for modeling concrete, real-world things, like cars, as well as relations between things, like companies and employees, students and teachers, and so on.
Primitive data structures
designed to represent simple pieces of information, such as the cost of an item or the title of a book. (e.g., numbers, strings)
Benefits of OOP
Reproducible
Reusable
Abstraction
Encapsulation
Inheritance
Polymorphism
Class
used to create a user-defined data structure and is a template or blueprint for a new type of object that share properties called attributes.
Methods
identify the behaviors and actions that an object created from the class can perform with its data. Defined by classes
Object
an ___ built from the class contains specific information about that particular object.
Attributes
properties of the object that define its characteristics
Operations
the functions that an object can perform that, among other things, allow the object to change its attributes
Constructors
code that initializes an object as it is being created
Methods
the behavior each object can execute
Encapsulation
protects an object’s data from outside access
Abstraction
a distancing between ideas and details
Inheritance
allows classes to inherit features of other classes. supports reusability
Parent classes
extend attributes and behaviors to child classes
Benefits of Inheritance
can create a generic parent class, and then create more specific child classes as needed.
Superclass/Baseclass
parent class
Derived class/Extended class
child class
Client program
a program that uses objects (the main function)