Introduction to Programming and Program Development Flashcards

(41 cards)

1
Q

What are the five key steps in developing an embedded application?

A

Define requirements, design software (flowcharts/pseudocode), translate to code, test and debug, document the software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is defining system requirements important?

A

To determine needed inputs, outputs, speed, storage, and suitable hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What tools help plan software before coding?

A

Flowcharts and pseudocode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is testing and debugging?

A

Identifying and removing errors or unexpected behaviour (bugs) in code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why must code be documented?

A

So future developers (or yourself) can understand and modify it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a program?

A

A recorded sequence of instructions that performs tasks to produce a specific result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is software?

A

Collections of programs, libraries, and related data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a programming language?

A

A formal notation with instructions and rules for writing programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are high-level languages?

A

Languages close to human language that hide hardware details (e.g., Python, C++, Java).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are low-level languages?

A

Languages close to machine instructions (e.g., Assembly, Machine Code).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How is C often described in terms of language level?

A

A mid-level language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is C widely used in embedded systems?

A

It allows control close to hardware while remaining structured and powerful.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a flowchart?

A

A pictorial representation of program logic and flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why are flowcharts useful?

A

They allow visualising program structure without writing code, helping planning and debugging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Do flowcharts require knowledge of a specific programming language?

A

No.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the basic flowchart symbols?

A

Start/End (terminal), Process, Decision, I/O, Subprocess, Flow arrows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the rules for drawing flowcharts?

A

Start and end with terminals, consistent spacing, clear arrows, no overlapping lines, tidy layout.

18
Q

What are the three fundamental program constructs?

A

Sequence, Decision, Repetition.

19
Q

What is the Sequence construct?

A

Executes instructions one after another in order.

20
Q

What is the Decision construct?

A

Executes tasks based on a test condition.

21
Q

What is the Repetition construct?

A

Repeats tasks until a stopping condition is met.

22
Q

What does the sequence example (sum 1 to 10) demonstrate?

A

A brute-force approach with no decisions or loops.

23
Q

What does the decision + repetition example (sum 1 to 10) demonstrate?

A

A more efficient approach using a counter and condition.

24
Q

In repetition examples, what does the counter do?

A

Tracks progress through repeated loops.

25
What is the “sum numbers up to a limit” program an example of?
Combining user input, sequence, and repetition.
26
In the variation table, what three parts can be rearranged?
Sum (S), Increment (I), Check (C).
27
How many possible variations exist for ordering S, I, and C?
Six.
28
What does Variation 6 represent?
Sum → Increment → Check.
29
What does Variation 4 represent?
Increment → Sum → Check.
30
What does Variation 2 represent?
Check → Increment → Sum.
31
What is the backwards-counting variation?
Summing n + (n−1) + … + 1 by decrementing from n downward.
32
What is modular programming?
Breaking a program into smaller modules or subprograms.
33
Why use modular programming?
Makes programs easier to read, maintain, test, and modify.
34
What is a module?
A self-contained section of code that performs a specific task.
35
What is the advantage of using a module for delays?
Changing the delay requires editing code in only one place.
36
What is the problem with a non-modular delay approach?
Repeated identical code must be edited in multiple places when requirements change.
37
How does a modular delay function improve maintainability?
It centralises the logic into one reusable component.
38
What does the example of modular programming demonstrate?
Replacing repeated code with a single reusable block improves efficiency.
39
Why are sub-process blocks shown in flowcharts?
To represent modules or repeated tasks.
40
What does the Summary slide emphasise?
Programming terminology, high vs low-level languages, flowchart symbols, example programs, multiple approaches to the same problem, and modular programming.
41
What should students do for self-directed learning?
Write alternative flowcharts, practice decomposition (like for making tea), and participate in discussion forums.