AP® Computer Science A glossary
Algorithm
Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods
A step-by-step process for completing a task or solving a problem, written in words or drawn as a diagram such as a flowchart.
Appears in the course and exam description (CED): 1.1.A.1
An algorithm lists the steps to follow to complete a task or solve a problem. You can write it in plain words or draw it as a flowchart. A Java program is an algorithm written in a language the computer can check and run.
int total = 80 + 90 + 85; // step 1: add the scores
System.out.println(total / 3); // step 2: divide and display
Output:
85 Learn it properly, with a checkpoint 1.1 Introduction to Algorithms, Programming, and Compilers