Module 1 - OOP Concepts Flashcards
What does OOP stand for?
Object-Oriented Programming
What is Procedural programming?
about writing procedures or methods that perform operations on the data,
What is Object-oriented programming?
about creating objects that contain both data and methods.
Object Oriented programming is a programming style which is associated with the concepts like_________________
(6 items)
class,
object,
Inheritance,
Encapsulation,
Abstraction,
Polymorphism.
What are samples of procedural-oriented programming
C, Fortran, Cobol and Pascal
Give the 3 problem solving phases
- Analysis
- General solution
- Verify
In problem solving phases, what is “Analysis”?
Define problem and what solution must do
In problem solving phases, what is “General Solution”?
Develop logical sequence of steps to solve problem
In problem solving phases, what is “Verify”?
Follow steps - by hand
What is the sequence structure?
series of processes carried out one after the other. Each instruction is executed in a serial manner, one after another.
What are the 4 advantages of OOP?
- OOP is faster and easier to execute.
- It provides clear structure for the programs.
- Help us to keep the Java code DRY “Don’t Repeat Yourself”, and makes the code easier to maintain, modify and debug.
- OOP makes it possible to create full reusable applications with less code and shorter development time.
The “Don’t Repeat Yourself (DRY)” principle is about ____________
reducing the repetition of code. You should extract out the codes that are common for the application and place them at a single place and reuse them instead of repeating it.
What is “class” in OOP?
encapsulates both the static properties and dynamic operations within a “box” and specifies the public interface for using these boxes.
Java – What are Classes
Class – is like an object constructor, or a “blueprint” for creating objects.
To create a class, use the keyword class:
Java – What are Objects?
Object – In Java, an object is created from a class. Continuing with the example awhile ago we created the class named MyClass, so now we can use this to create objects.
To create an object of Myclass, specify the class name, followed by the object name, and use the keyword new: