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
Q

The ___ keyword is responsible for instantiation.

A

new

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

The right-hand side of the expression invokes the constructor (True or False)

A

True

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

is a special function of the class that is responsible for initializing
the variables of the class

A

Dart Constructors

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

Dart defines a constructor with the same name as that of the ____

A

class

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

A constructor is a function and hence cannot be parameterized. (True or False)

A

False

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

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)

A

True

31
Q

enable a class define multiple constructors.

A

Named Constructor

32
Q

also called as accessors and mutators

A

Getters and Setters

33
Q

, allow
the program to initialize and retrieve the values of class fields respectively

A

Getters and Setters

34
Q

Setters or mutatord are
defined using the ___ keyword

A

set

35
Q

Getters or accessors are
defined using the ___ keyword

A

get

36
Q

The ____ keyword refers to the current instance of the class in a method or
constructor with parameters

A

this

37
Q

inherit members from parent class

A

Inheritance

38
Q

Access class through parents interface

A

Polymorphism

39
Q

Define and execute abstract actions

A

Abstraction

40
Q

Hide internal properties of the class

A

Encapsulation

41
Q

The class giving its members to its child class

A

Base class / Parent Class

42
Q

The class taking members from its base class

A

Derived Class / Child Class

43
Q

used in conjunction with the object to access a class’s data members

A

Period operator (.)

44
Q
  • to enable a class define multiple constructors
A

Name Constructors

45
Q
  • allows child classes (derived) to inherit the characteristics of an existing parent class (base)
A

Inheritance

46
Q
  • Child classes inherits all properties and methods excepts constructors of the parent class
A

True

47
Q

when a class inherits a single parent class

A

Single inheritance

48
Q

when a class inherits more than one parent class

A

Multiple inheritance

49
Q

when a class inherits another child class

A

Multi-level inheritance

50
Q

More than one class having the same parent class

A

Hierarchical inheritance

51
Q

Like Java, Dart supports multiple inheritance (True or False)

A

False

52
Q

Child classes inherits all properties and methods excepts constructors of the parent class (True or False)

A

True1

53
Q

Every class can at the most extend from one parent class

A

Single Inheritance

54
Q

A class can inherit properties of the base class from another child class.

A

Multi – level Inheritance

55
Q

Hierarchical Inheritance

A

More than one classes have the same parent class

56
Q

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.

A

Polymorphism

57
Q

define and execute abstract actions. Ignoring irrelevant features, properties, or functions and emphasizing on relevant ones. Abstraction helps manage complexity.

A

Abstraction

58
Q

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)

A

Encapsulation

59
Q

specifies what and how a specific task would be done.

A

function definition

60
Q

It is not mandatory to specify the data type of the parameter.

A

True

61
Q

The data type of the value passed must match the type of the parameter during its declaration.

A

True

62
Q

void function_name(param1, [optional_param_1, optional_param_2]) { }

A

Optional Positional Parameter

63
Q

To specify optional positional parameters, use_____

A

[]

64
Q

Unlike positional parameters, the parameter’s name must be specified while the value is being passed

A

Optional named parameter

65
Q

____ braces can be used to specify optional named parameters.

A

{} / Curly braces

66
Q

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);
}

A

Optional named parameter

67
Q

void main() {
test_param(123);
}
void test_param(n1,{s1:12}) {
print(n1);
print(s1);
}

A

Optional Parameters with Default Values

68
Q

Function parameters can also be assigned values by default. However, such parameters can also be explicitly passed values.

A

True

69
Q

is any variable declared in a class. represent data pertaining to objects.

A

Fields

70
Q

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

A

Setters and Getters

71
Q

responsible for allocating memory for the objects of the class.

A

Constructors

72
Q

represent actions an object can take. They are also at times referred to as methods.

A

Functions

73
Q

These components(Fields, Setters and Getters, Methods or Functions, Constructors) put together are termed as the

A

data members

74
Q

A default getter/ setter is associated with every class. However, the default ones can be overridden by explicitly defining a setter/ getter.

A

True