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
2
Q
function definition specifies what and how a specific task would be done
A
defining a function
3
Q
a function must be called sa as to execute it
A
calling a function
4
Q
functions may return value along with control, back to the caller
A
returning a function
5
Q
paremeters are a mechanism to pass values to functions
A
parameterized function
6
Q
functions and descriptions
A
- defining a function
- calling a function
- returning a function
- parameterized function
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
8
Q
three types of optional parameters in Dart
A
- optional positional paramaters
- optional named parameters
- optional parameters with default values
9
Q
to specify this paramater, use bracket[]
A
optional positional parameter
10
Q
- parameter’s name must be specified while name value is passed
- {} can be used to specify
A
optional named parameters
11
Q
- values can also be defined by default
- parameters can be explicitly passed values
A
optional parameter with default value
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
13
Q
Lambda
A
- concise mechanism to represent function
- also called as arrow functions
14
Q
A class definition can include the following
A
- field
- setter and getter
- constructor
- function
15
Q
- s any variable declared in a class.
- represent data pertaining to
objects
A
field