# 3.13 Developing Procedures

## Enduring Understanding

Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

## Learning Objective

Explain how the use of procedural abstraction manages complexity in a program. 

## Essential Knowledge

One common type of abstraction is procedural abstraction, which provides a name for a process and allows a procedure to be used only knowing what it does, not how it does it.

Procedural abstraction allows a solution to a large problem to be based on the solutions of smaller subproblems. This is accomplished by creating procedures to solve each of the subproblems.

The subdivision of a computer program into separate subprograms is called modularity.

A procedural abstraction may extract shared features to generalize functionality instead of duplicating code. This allows for program code reuse, which helps manage complexity.

Using parameters allows procedures to be generalized, enabling the procedures to be reused with a range of input values or arguments.

Using procedural abstraction helps improve code readability.

Using procedural abstraction in a program allows programmers to change the internals of the procedure (to make it faster, more efficient, use less storage, etc.) without needing to notify users of the change as long as what the procedure does is preserved.

## Learning Objective

Develop procedural abstractions to manage complexity in a program by writing procedures. 

## Essential Knowledge

The exam reference sheet provides&#x20;

Text:

PROCEDURE procName(parameter1, parameter2, ...)

{

&#x20;    \<block of statements>

}

Block:

<figure><img src="/files/rwqEUDGBBq0cwKRdAasR" alt=""><figcaption></figcaption></figure>

which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements.

The exam reference sheet provides:

Text:

PROCEDURE procName(parameter1, parameter2, ...)

{

&#x20;    \<block of statements>

&#x20;    RETURN(expression)

}

Block:

<figure><img src="/files/RVSQ80CSnGSfmpBCcYD9" alt=""><figcaption></figcaption></figure>

which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements and returns the value of expression. The RETURN statement may appear at any point inside the procedure and causes an immediate return from the procedure back to the calling statement.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.csprinciples.com/big-idea-3/3.13-developing-procedures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
