Module 4 Flashcards

(78 cards)

1
Q

A _________ is a set of statements to perform a specific task.

A

function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_________ organize the program into logical blocks of code.

A

Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

_________ may be called to access code.

A

functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

_________ are the building blocks of readable, maintainable, and
reusable code.

A

Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

_________ {
// main function goes here
}

A

main()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A function must be called to execute it. This process is
termed as _________.

A

function invocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

_________ may also return value along with the control, back
to the caller.

A

Returning functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The _________ can be any valid data type.

A

return_type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The _________ statement is optional. If not specified, the
function returns null.

A

return

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The return statement is optional. If not specified, the
function returns _________ .

A

null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The _________ of the value returned must match the return
type of the function.

A

data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A function can return at the most _________ value. In other
words, there can be only _________ return statement per function.

A

one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

_________ are a mechanism to pass values to functions.

A

Parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

_________ form a part of the function’s signature.

A

Parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The _________ values are passed to the function during its invocation.

A

parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

_________ is a programming language model in which programs are organized around data, or objects, rather than functions and logic.

A

Object-oriented programming (OOP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

An object is an _________ meant to represent a component of a program.

A

abstraction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

_________ can be created, destroyed, given attributes, and made
to perform actions.

A

Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Every object belongs to a _________.

A

class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The class of an object is its _________.

A

type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Objects of the same class have the same ________ variables and methods available to them

A

instance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

a _________ is 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).

A

class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Use the _________ keyword to declare a class in Dart.

A

class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

A class definition starts with the keyword class followed by the _________

A

class name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
the class body enclosed by a pair of _________.
curly braces
26
A _________ is any variable declared in a class. They represent data pertaining to objects.
field
27
Allows the program to initialize and retrieve the values of the fields of a class.
Setters and Getters
28
A _________ getter/ setter is associated with every class. However, they can be overridden by explicitly defining a setter/getter.
default
29
responsible for allocating memory for the objects of the class.
Constructors
30
represent actions an object can take.
Functions
31
Functions are also at times referred to as _________.
methods
32
To create an instance of the class, use the _________ keyword followed by the class name.
new
33
The _________ keyword is responsible for instantiation.
new
34
The constructor should be passed _________ if it is parameterized.
values
35
is a special function of the class that is responsible for initializing the variables of the class.
constructor
36
Dart defines a constructor with the same name as that of the _________.
class
37
A constructor is a function and hence can be _________
parameterized
38
unlike a function, constructors cannot have a _________
return type
39
If you don’t declare a constructor, a default _________ is provided for you.
no-argument constructor
40
Dart provides _________ to enable a class define multiple constructors.
named constructors
41
Dart provides named constructors to enable a class define _________.
multiple constructors
42
_________ and _________, also called as accessors and mutators
Getters and Setters
43
Getters and Setters, also called as _________ and _________
accessors and mutators
44
_________ allow the program to initialize and retrieve the values of class fields respectively
Getters and Setters
45
Getters or accessors are defined using the _________ keyword.
get
46
Setters or mutators are defined using the _________ keyword.
set
47
The _________ keyword refers to the current instance of the class in a method or constructor with parameters
this
48
Fundamental Principles of OOP
Inheritance Polymorphism Abstraction Encapsulation
49
inherit members from parent class
Inheritance
50
Access class through parents interface
Polymorphism
51
Define and execute abstract actions
Abstraction
52
Hide internal properties of the class
Encapsulation
53
The class giving its members its child class
Base (parent) class
54
The class taking members from its base class
Derived (child) class
55
Inheritance implicitly takes __________ from another class
all members
56
In Inheritance, some members may be __________ : private members hidden in the derived class
inaccessible
57
Use __________ for building is-a relationship * i.e: Dog is-a animal
inheritance
58
Inheritance allows __________ to inherit the characteristics of an existing parent class (base)
child classes (derived)
59
Inheritance allows child classes (derived) to inherit the characteristics of an existing __________
parent class (base)
60
A __________ can extend the parent class
child class
61
An __________ defines set of operations(methods) that a given should support
interface
62
A class can implement an __________ by providing implementation for all methods
interface
63
Types of inheritance
Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
64
when a class inherits a single parent class Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Single inheritance
65
When a class inherits more than one parent class Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Multiple inheritance
66
when a class inherits another child class Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Multi-level inheritance
67
More than one class having the same parent class Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Hierarchical inheritance
68
Child classes inherits all properties and methods excepts __________ of the parent class
constructors
69
Unlike Java, Dart does not support __________ inheritance
multiple
70
Every class can at the most extend from one parent class Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Single inheritance
71
A class can inherit properties of the base class from another child class. Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Multi-level inheritance
72
More than one classes have the same parent class Single inheritance Multiple inheritance Multi-level inheritance Hierarchical inheritance
Hierarchical inheritance
73
A __________ type of inheritance only that inherits properties of parent class only that it overrides the same method declared in child class
Multi-level
74
provide means ignoring irrelevant features, properties, or functions and emphasizing on relevant ones
Abstractions
75
Abstractions helps manage complexity (T/F)
T
76
Hides implementation details
Encapsulation
77
Class announces only a few operations (methods) available to objects
Encapsulation
78
All data members(fields) of the class are hidden and can only be accessed via properties (read-only and read-write)
Encapsulation