zuai-logo
zuai-logo
  1. AP Computer Science Principles
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion BankGlossaryGlossary

Glossary

A

Arguments

Criticality: 2

The actual values or expressions that are passed to a procedure when it is called, corresponding to the procedure's parameters.

Example:

When calling addNumbers(5, 10), the values 5 and 10 are the arguments passed to the addNumbers procedure.

E

Encapsulation

Criticality: 2

The bundling of data and methods that operate on the data within a single unit, allowing changes to be made internally without affecting external parts of the program.

Example:

A game character's movement logic is often encapsulated within a single procedure, so changes to how the character walks don't break the jumping or attacking animations.

M

Modularity

Criticality: 2

The practice of dividing a program into separate, independent parts or modules, making it easier to organize, debug, and update.

Example:

Building a complex game by creating separate modules for graphics, sound, and player movement demonstrates modularity, making development and debugging much easier.

P

Parameters

Criticality: 3

Variables listed in a procedure's definition that act as placeholders for the inputs the procedure will receive when it is called.

Example:

In a greetUser(name) procedure, name is a parameter that allows the procedure to greet different users like 'Hello, Alice!' or 'Hello, Bob!'

Procedural Abstraction

Criticality: 3

A programming concept that allows you to use a procedure without needing to know the specific internal details of how it works.

Example:

When you use a calculator's square root button, you're using procedural abstraction; you don't need to know the complex algorithm it uses, just that it gives you the square root.

Procedure

Criticality: 3

A named block of code that performs a specific task, also known as a function or method in different programming languages.

Example:

A procedure named calculateTax might take an income as input and return the calculated tax amount, simplifying financial software.

R

Readability

Criticality: 2

A quality of code that makes it easy for humans to understand and interpret, often improved by using clear procedures and good naming conventions.

Example:

Using well-named procedures like displayWelcomeMessage instead of a long block of print statements greatly improves code readability for anyone looking at the program.

Return Statement

Criticality: 3

A statement within a procedure that immediately stops its execution and sends a value back to the point where the procedure was called.

Example:

After calculating a student's grade, a procedure might use a return statement to send that final grade back to the main program for display.

Reusability

Criticality: 3

The ability to use the same procedure multiple times in different parts of a program or in different scenarios, often by providing different inputs.

Example:

A single drawCircle reusability procedure can be used to draw circles of different sizes and colors all over a graphic design program, simply by changing its parameters.

V

Void Procedure

Criticality: 2

A type of procedure that performs a task but does not return any specific value to the calling part of the program.

Example:

A printGreeting() void procedure might simply display 'Welcome!' on the screen without calculating or returning any specific data.