Objects, UML, and Java Flashcards
Two most popular programming languages in 1960s
COBOL, Fortran
Imperative Paradigm
COBOL and Fortran followed an imperative paradigm which broke up large programs into smaller programs called subroutines, which are like methods in Java.
Two new algorithms in the 1970s
Algol 68, Pascal
New idea of programming introduced in 1970s
Local Variables
Abstract Data Type
An abstract data type is a data type that is defined by the programmer and not built into the language. An abstract data type is essentially a grouping of related information that is denoted with a type. It was a way to organize data in a meaningful way.
These two programming languages provided a means to organize programs and allow developers to more easily create multiple but unique copies of their abstract data types.
C, Modula-2
The crucial concept that became popular in the 1980s
Object Oriented Design
The goal of object-oriented design is to:
- Make an abstract data type easier to write
- Structure a system around abstract data types called classes
- Introduce the ability for an abstract data type to extend another
Object Oriented Programming is a paradigm. What are the 3 programming languages founded based off objects?
Java, C++, C#
Abstraction
Abstraction is the idea of simplifying a concept in the problem domain to its essentials within some context. Abstraction allows you to better understand a concept by breaking it down into a simplified description that ignores unimportant details.
Rule Of Least Astonishment
The abstraction captures the essential attributes and behavior for a concept with no surprises and no definitions that fall beyond its scope. You don’t want to surprise anyone trying to understand your abstraction with irrelevant characteristics.
Encapsulation
Encapsulation forms a self-contained object by bundling the data and functions it requires to work, exposes an interface whereby other objects can access and use it, and restricts access to certain inside details.
Decomposition
Decomposition is taking a whole thing and dividing it up into different parts. Or, on the flip side, taking a bunch of separate parts with different functionalities and combining them together to form a whole. Decomposition allows you to further break down problems into pieces that are easier to understand and solve.
How does inheritance work?
We use repeated, common, and shared characteristics between 2 or more classes and factor them out into another class. There is a parent class (superclass) and a child class (subclass).
Generalization
Technique which let us apply a rule “Don’t Repeat Yourself” (DRY) to write programs that are capable of performing the same tasks but with less code. It makes code more reusable because different classes or methods can share the same blocks of code.