Mobile App Development 3 Flashcards

1
Q

functions

A
  • building blocks of readable, maintainable, and reusable code
  • statements to perform a specific task
  • organize the program into logical
    blocks of code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

function definition specifies what and how a specific task would be done

A

defining a function

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

a function must be called sa as to execute it

A

calling a function

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

functions may return value along with control, back to the caller

A

returning a function

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

paremeters are a mechanism to pass values to functions

A

parameterized function

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

functions and descriptions

A
  1. defining a function
  2. calling a function
  3. returning a function
  4. parameterized function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • can be used when arguments need not be compulsorily passed for a function’s execution.
  • A parameter can be marked optional by appending a question mark to its name.
A

Optional Parameters

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

three types of optional parameters in Dart

A
  1. optional positional paramaters
  2. optional named parameters
  3. optional parameters with default values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

to specify this paramater, use bracket[]

A

optional positional parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • parameter’s name must be specified while name value is passed
  • {} can be used to specify
A

optional named parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • values can also be defined by default
  • parameters can be explicitly passed values
A

optional parameter with default value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • technique for iterating over an operation by having a function call to itself
    repeatedly until it arrives at a result
  • best applied when you need to call the
    same function repeatedly with different parameters from within a loop.
A

recursion

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

Lambda

A
  • concise mechanism to represent function
  • also called as arrow functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A class definition can include the following

A
  1. field
  2. setter and getter
  3. constructor
  4. function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  • s any variable declared in a class.
  • represent data pertaining to
    objects
A

field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • Allows the program to initialize and retrieve the values of the fields of a class
  • associated with every class
A

setter and getter

17
Q

responsible for allocating memory for the objects of the class

A

constructor

18
Q
  • represent actions an object can take
  • also known as method
A

function

19
Q

components put together are termed

A

data members

20
Q
  • to create instance, what keyword should be used that is followed by class name
  • responsible for instantiation
A

new

21
Q

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

A

True

22
Q

The constructor should be passed values if it is parameterized (true or flase)

A

true

23
Q

what can you access through the object

A

attribute and functions

24
Q

if you do not declare a constructor, this is provided for you

A

no argument constructor

25
Q

Does dart provides named constructors to enable a class define multiple constructors

Yes or No

A

Yes

26
Q

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

A

Getters and Setters

27
Q
  • A class inherits from another class using the ‘extends’ keyword
  • Child classes inherit all properties and methods except constructors from the parent class
A

Class Inheritance

28
Q

Types of Inheritance

A
  1. single
  2. multiple
  3. multi-level
29
Q

class can at the most extend from one parent class.

A

Single

30
Q

A class can inherit from multiple classes. Dart doesn’t support multiple
inheritance

A

Multiple

31
Q

class can inherit from another child class

A

Multi-level

32
Q

defines the datatype in which output is going to come.

A

return type

33
Q

there are four types of functions in Dart

A
  1. no parameter and no return type
  2. parameter and no return type
  3. no parameter and return type
  4. parameter and return type