Appdev Midterm Quiz 1 Flashcards
Is a set of statements to perform a specific task
Functions
Organize the
program into logical blocks of code.
Functions
are the building blocks of readable, maintainable, and reusable code.
Functions
This process is termed as function
invocation.
Calling a Function
Return value along with the control, back to the
caller.
Returning Function Values
The return statement is optional. If not specified, the function returns null? (True/False)
True
A function can return at the most ____ value.
1
form a part of the function’s signature
Parameters
are a mechanism to pass
values to functions.
Parameters
The parameter values are
passed to the function during its invocation (True / False)
True
is a programming
language model in which programs are organized around data, or objects, rather than functions and
logic.
Object-Oriented Programming
is an abstraction meant to represent a component of a program
Object
Objects cannot be
created, destroyed, given attributes, and made to perform actions (True / False)
False
The ____ of an object is its type
class
Every object belongs to a class (True or False)
True
Objects of the same class have the same instance
variables and methods available to them (although the value of those instance variables may
differ) (True or False)
True
a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or
methods)
Class
A class definition starts with the keyword _____
class
any variable declared in a class. Represent data pertaining to objects.
Fields
Allows the program to initialize and retrieve the values of the fields of
a class.
Setters and Getters
A default getter/ setter is associated with every class. However, the default ones can
be overridden by explicitly defining a setter/ getter. (True or False)
True
responsible for allocating memory for the objects of the class.
Constructors
represent actions an object can take
Functions
They are also at times referred to as methods
Functions
The ___ keyword is responsible for instantiation.
new
The right-hand side of the expression invokes the constructor (True or False)
True
is a special function of the class that is responsible for initializing
the variables of the class
Dart Constructors
Dart defines a constructor with the same name as that of the ____
class
A constructor is a function and hence cannot be parameterized. (True or False)
False