Test Java (OOP Introduction)
4 Benefits of Object Oriented Programming:
1. Modulatrity 2. Information-hiding 3. Code re-use 4. easy de-bugging
__________________________ is a programming paradigm based on the concept of "objects" that contain data and methods.
Object-oriented programming System (OOPs)
The design method used in procedural programming is called ______ __________ Design. This is where you start with a problem (procedure) and then systematically break the problem down into sub problems (sub procedures).
Top Down
A ________ is a collection of objects that have common properties, operations and behaviors. A ________ is a combination of state (data) and behavior (methods)
class
The statement: new Student(); creates an instance of the _________ Student, a Student object. Each _________ has operations associated with it. Each Student object has a number of distinct behaviors, such as major, degree, etc.
class
In object oriented programming, the main modules in a program are ______________, rather than procedures.
classes
The object-oriented approach lets you create __________ and __________ that model real world objects.
classes; objects
In good design, the ____________ should be maximized. _______________ is decreased if the methods of a class have little in common, or methods carry out many activities.
cohesion
______________: is the measure within a module (class) of how well the members work together to provide a specific piece of functionality. ______________ is measured by how strongly related and focused the responsibilities of a single class are.
cohesion
A well-designed system should maximize________________, and minimize _________________.
cohesion coupling
In Java a special function called a _________________ is used to create and initialize an instance of a class. The statement: new Student();
constructor
With low ____________ a change in a module will not require changes in other modules.
coupling
________________: the degree to which a module (class) depends on other classes. In a good design, you should try to minimize ____________.
coupling
encapsulation the ability of an object to hide its _______ and __________ from the rest of the world - one of the fundamental principles of OOP.
data methods
_______________: the hiding of an objects internal state and requiring all interaction to be performed using the objects methods.
encapsulation
__________________: the ability of an object to hide its data and methods from the rest of the world - one of the fundamental principles of OOP.
encapsulation
__________ are the variables contained in a class (encapsulated) that are used to represent these properties. For example, class Student may have an integer _______ to represent graduation year, or a String _________ to represent the student's Last Name.
fields
An object stores its state in ___________, and it exposes its behaviors through its ___________.
fields methods
The primary purpose of object-oriented programming is to increase the ____________ and ________________ of programs.
flexibility maintainability
_________________ is where you start with a problem (procedure) and then systematically break the problem down into sub problems (sub procedures), it continues until a sub problem is straightforward enough to be solved by the corresponding sub procedure.
functional decomposition
Classes in Java occur in _____________ hierarchies. These hierarchies consist of parent child relationships among the classes. ______________ is used to specialize a parent class, but creating a child class
inheritance
_________ ______________ and __________ can be added, deleted, or changed, but as long as the services provided by the object remain the same, code that uses the object can continue to use it without being rewritten.
instance variables methods
The operations associated with a class, together with the attributes of a class are encapsulated within the class. These operations are called the ____________ of a class.
methods
______________ are functions that represent the operations associated with a particular class.
methods
Object oriented programming brings together data and its behavior( ___________ ) in a single location ( ___________ ) makes it easier to understand how a program works.
methods object
Programs are made up of ___________, which are parts of a program that can be coded and tested separately, and then assembled to form a complete program.
modules
An ___________ is an instance of a class.
object
In _______________ languages (i.e. C) these modules are _____________, where a _______________ is a sequence of statements.
procedural procedures procedure
In object-oriented languages, a class is a data type, and objects are instances of that data type. In other words, classes are ______________ from which _____________ are created.
prototypes objects
The difficulties with procedural programming, is that?
software maintenance can be difficult and time consuming.
Real world objects all share two characteristics; they all have ________ and ___________.
state behavior