COP2253 Zybooks Chapter Six Flashcards
method
a grouping of predefined statements for repeatedly used operations
method definition
consists of the new method’s name and a block of statements
method call
an invocation of a method’s name, causing the method’s statements to execute
block
a list of statements surrounded by braces
method’s must be defined within a:
class
public
the method may be called from any class in the program
static
the method only uses values that are passed to the method
parameter
a method input specified in a method definition
argument
a value provided to a method’s parameter during a method call
parameters are assigned with argument values by:
position
return statement
used by a method to return one value
void
the method does not return any value (and cannot be used within an expression)
modular development
the process of dividing a program into separate modules that can be developed and tested separately and then integrated into a single program
incremental development
the process in which a programmer writes, compiles, and tests a small amount of code, then a small amount more, and so on.
method stub
a method definition whose statements have not yet been written