Lesson 1 Flashcards
- A programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and for and while loops.
- Also known as procedural programming that uses the principle of Top-Down Design Principle frist created by Dr. Edsger W. Dijkstra in 1960s.
Structured Programming
This paradigm uses the following control structure:
- Sequence
- Selection / Condition
- Iteration / Loops
Structured Programming
A programming paradigm based on the concept of “objects which are data structure that contain data, in the form of fields, often known as attributes, and in the form of procedures, often known as methods.
Object Oriented Programming
What are the two types of Programming Paradigm?
- Structured Programming
- Object Oriented Programming
This is the basic runtime entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item.
Objects
Objects can interact without having to know the details of each other’s data or code.
True
This may be though of as a ‘data type’ and an object as a ‘variable’ of that data type. Once the ___ has been defined we can create any number of objects belonging to that ___.
Class
A collection of objects of similar type.
Class
Are user-defined data-types and behave like the built-in types of a programming language.
Classes
What are the basic concepts of object-oriented programming?
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
The wrapping up of data and methods into a single unit (called class) is known as ____.
Encapsulation
- The data is not accessible to the outside world and only those methods, which are wrapped in the class, can access it.
- This makes it possible for objects to be treated like “black boxes” each performing a specific task without any concern for internal implementation.
Encapsulation
The insulation of the data and direct access by the program is called ________.
Data Hiding
It refers to the act of representing essential features without including the background details or explanation.
Abstraction
- It is the process by which objects of one class acquire the properties of objects of another class.
- This supports the concept of t he hierarchal classification.
Inheritance
In OOP, the concept of inheritance provides the idea of reusability. This means that we can add additional features to an existing one.
Inheritance
In Java, the derived class is known as ______
Subclass
This means the ability to take more than one form
Polymorphism
- This plays an important role in allowing objects having different internal structures to share the same external interface.
- Is extensively used in implementing inheritance.
Polymorphism
Give the Benefits of OOP
- Eliminate redundancy of codes.
- Possible to have multiple objects to coexist without any interference.
- It is easy to partition the work in a project based on objects.
Give applications of OOP:
- Real-time Systems
- Simulation and Modeling
- CAD System
- Object-oriented databases
An object-oriented language. It enables us not only to organize our program code into logical units called objects but also to take advantage of encapsulation, inheritance, and polymorphism.
Java
Who Developed Java?
Dr. James Gosling
When was Java released? And who owns it by that time?
1995 by Sun Microsystem
Who initiated Java language project in June 1991?
James Gosling, Mike Sheridan, and Patrick Naughton
Gosling designed Java with a ______ style syntax that system and application programmers would find familiar.
C/C++
Famous Java Quote:
Write Once, Write Everywhere
Java was released open source on this date:
November 13, 2006
Who acquired Sun Microsystems in 2009-2010?
Oracle Corporation
6 Types of Java Applications
- Java Applet
- Application
- JAR (Java Archive)
- Servlet
- Swing
- EJB (Enterprise Java Beans)
Give the Characteristics of Java
- Simple
- Object-oriented
- Distributed
- Interpreted
- Robust
Give the Benefits of Java
- It comes with a large set of classes and methods, the Java API that can be used without having to develop as nyc code “from scratch”
- Open Source
- Taught as a first language yet still used by professionals
A ___ is fundamental unit of program structure in Java. All Java program are ____.
Class
This is the starting point of program execution of Java program
Public static void main(String[] args)
The keyword ____ mean any variables of value that is being declared in the method can be used anywhere in out program.
Public
This statement will display or print the message:
System.out.println()
- A ____ is a value that can be changed depending on condition or information passed to the program.
- This can be reused through out your program, instead of having to type out the actual value all over and over again.
Variable
It refers to those variable whose value does not change during program execution.
Constant Variables
_____ are names given to various program elements such as variables functions and arrays.
Variables
A set of data that specifies the possible range of values of the set, the operations that can be performed on the values, and the way in which the values are stored in memory.
Data Type
Give the 8 data types:
- byte
- short
- int
- long
- float
- double
- boolean
- char
Four categories of Java Operators:
- Arithmetic
- Relational
- Logical
- Assignment
Give examples of Arithmetic Operators:
+, -, *, /, %, ++, —
Give examples of Relational Operators:
==, !=, >, <, >=, <=,
Give examples of Logical Operators:
&&, ||, !
Give examples of Assignment Operators:
=, +=, -=, /=, %=