MIDTERM QUIZ1: Flashcards
Organizes the program into logical blocks of code
Functions
the keyword _____ refers to the current instance of the class
this
an abstraction meant to represent a component of a program
Object
A multi level type of inheritance only that it overrides the same method declared in child class
Polymorphism
a type of inheritance where classes has the same parent class
Hierarchical Inheritance
TRUE OR FALSE
Multiple inheritance is described as more than one class having the same parent class.
False
TRUE OR FALSE
mutator is another term used for getters
False
TRUE OR FALSE
objects can be created, destroyed, and be given with attributes and made to perform actions
True
mutators is defined using the keyword___
set
TRUE OR FALSE
Named constructors enables a class define multiple constructors
True
A type of inheritance where a class can inherit attributes of another child class
Multi-level Inheritance
The keyword ___ is used to instantiate an object
new
This principle leads to a concept in object-oriented programming that allows a class to extend its attribute from another class.
Inheritance
TRUE OR FALSE
derived class inherits the characteristics of base class
True
allows you to access the properties of the class through interface without worrying its internal implementation
Abstraction
hides implementation details of the class
Encapsulation
Also referred to as method
function
used to initialize state of the object
constructor
represents data pertaining to an object
fields
allows an object to access fields of a class
getters and setters
ENUMERATION
the 4 statement in a parameterized function is
An optional parameter may have a default value
Parameter values are passed to the function during its invocation.
{ } are used to specify optional paramaters
In an Optional parameterized functions, requried parameters must be declared before the optional parameters
ENUMERATION
True about a class
a blueprint for instantiating an object
have attributes inherited by an object
ENUMERATION
True about constructors
A constructor is a function and can be parameterized
Constructor has the same name as the class name
ENUMERATION
True about the return type of a function
A function can return at most one value
if a return statement is not specified, a function returns null