programming Flashcards
A class describes…
A class describes a kind of object.
What does a class specify?
Classes specify different types of attributes, e.g. colours, designs, location
Define an algorithm
a set of instructions that are followed in order to complete a task or solve a problem
Pseudocode
a human-readable way to write algorithms
using exactly these features
What is an array?
a data structure that stores related data in a collection that are all the same size or type.
Name 4 different control structures
- Direct Sequencing
- Conditional Sequencing
- Bounded iteration
- Conditional Iteration
Define direct sequencing
the order in which steps are executed in an algorithm or program
Define conditional sequencing
a way to control the order in which lines of code are executed by a computer
for-loop
a control flow statement that is used to repeatedly execute a group of statements as long as the condition is satisfied
Define Bounded iteration
where a loop executes a fixed, predetermined number of times.
Define Conditional iteration
repeatedly executes. a section of code until a condition is met - or no longer met.
while-loop
a control flow statement that allows code to be executed repeatedly based on a given Boolean condition.
What are the main ArrayList methods?
add, get, remove, size