Appdev Midterm Quiz 1 Flashcards

1
Q

Is a set of statements to perform a specific task

A

Functions

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

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
4
Q

This process is termed as function
invocation.

A

Calling a Function

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

Return value along with the control, back to the
caller.

A

Returning Function Values

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

The return statement is optional. If not specified, the function returns null? (True/False)

A

True

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

A function can return at the most ____ value.

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
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
9
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
10
Q

The parameter values are
passed to the function during its invocation (True / False)

A

True

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

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

A

Object-Oriented Programming

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

is an abstraction meant to represent a component of a program

A

Object

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

Objects cannot be
created, destroyed, given attributes, and made to perform actions (True / False)

A

False

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

The ____ of an object is its type

A

class

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

Every object belongs to a class (True or False)

A

True

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

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)

A

True

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

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
18
Q

A class definition starts with the keyword _____

A

class

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

any variable declared in a class. Represent data pertaining to objects.

A

Fields

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

Allows the program to initialize and retrieve the values of the fields of
a class.

A

Setters and Getters

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

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)

A

True

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

responsible for allocating memory for the objects of the class.

A

Constructors

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

represent actions an object can take

A

Functions

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

They are also at times referred to as methods

A

Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The ___ keyword is responsible for instantiation.
new
26
The right-hand side of the expression invokes the constructor (True or False)
True
27
is a special function of the class that is responsible for initializing the variables of the class
Dart Constructors
28
Dart defines a constructor with the same name as that of the ____
class
29
A constructor is a function and hence cannot be parameterized. (True or False)
False
30
However, unlike a function, constructors cannot have a return type. If you don’t declare a constructor, a default no-argument constructor is provided for you (True or False)
True
31
enable a class define multiple constructors.
Named Constructor
32
also called as accessors and mutators
Getters and Setters
33
, allow the program to initialize and retrieve the values of class fields respectively
Getters and Setters
34
Setters or mutatord are defined using the ___ keyword
set
35
Getters or accessors are defined using the ___ keyword
get
36
The ____ keyword refers to the current instance of the class in a method or constructor with parameters
this
37
inherit members from parent class
Inheritance
38
Access class through parents interface
Polymorphism
39
Define and execute abstract actions
Abstraction
40
Hide internal properties of the class
Encapsulation
41
The class giving its members to its child class
Base class / Parent Class
42
The class taking members from its base class
Derived Class / Child Class
43
used in conjunction with the object to access a class’s data members
Period operator (.)
44
- to enable a class define multiple constructors
Name Constructors
45
- allows child classes (derived) to inherit the characteristics of an existing parent class (base)
Inheritance
46
* Child classes inherits all properties and methods excepts constructors of the parent class
True
47
when a class inherits a single parent class
Single inheritance
48
when a class inherits more than one parent class
Multiple inheritance
49
when a class inherits another child class
Multi-level inheritance
50
More than one class having the same parent class
Hierarchical inheritance
51
Like Java, Dart supports multiple inheritance (True or False)
False
52
Child classes inherits all properties and methods excepts constructors of the parent class (True or False)
True1
53
Every class can at the most extend from one parent class
Single Inheritance
54
A class can inherit properties of the base class from another child class.
Multi – level Inheritance
55
Hierarchical Inheritance
More than one classes have the same parent class
56
A Hierarchical type of inheritance only that inherits properties of parent class only that it overrides the same method declared in child class It will execute the correct function code based on the type of the variable.
Polymorphism
57
define and execute abstract actions. Ignoring irrelevant features, properties, or functions and emphasizing on relevant ones. Abstraction helps manage complexity.
Abstraction
58
Hides implementation detail. - class announces only a few operations (methods) available to objects - all data members(fields) of the class are hidden and can only be accessed via properties (read-only and read-write)
Encapsulation
59
specifies what and how a specific task would be done.
function definition
60
It is not mandatory to specify the data type of the parameter.
True
61
The data type of the value passed must match the type of the parameter during its declaration.
True
62
void function_name(param1, [optional_param_1, optional_param_2]) { }
Optional Positional Parameter
63
To specify optional positional parameters, use_____
[]
64
Unlike positional parameters, the parameter's name must be specified while the value is being passed
Optional named parameter
65
____ braces can be used to specify optional named parameters.
{} / Curly braces
66
void main() { test_param(123); test_param(123,s1:'hello'); test_param(123,s2:'hello',s1:'world'); } test_param(n1,{s1,s2}) { print(n1); print(s1); }
Optional named parameter
67
void main() { test_param(123); } void test_param(n1,{s1:12}) { print(n1); print(s1); }
Optional Parameters with Default Values
68
Function parameters can also be assigned values by default. However, such parameters can also be explicitly passed values.
True
69
is any variable declared in a class. represent data pertaining to objects.
Fields
70
Allows the program to initialize and retrieve the values of the fields of a class.
Setters and Getters
71
responsible for allocating memory for the objects of the class.
Constructors
72
represent actions an object can take. They are also at times referred to as methods.
Functions
73
These components(Fields, Setters and Getters, Methods or Functions, Constructors) put together are termed as the
data members
74
A default getter/ setter is associated with every class. However, the default ones can be overridden by explicitly defining a setter/ getter.
True