COMPUTER PROGRAMMING 1 FINAL
EXAM QUESTIONS AND CORRECT
ANSWERS
Algorithm - Ans--A set of clear, easy to follow instructions for accomplishing some task.
(In programming we call these steps "methods")
Software Development Cycle - Ans--1. Design - 2. Implement - 3. Test - 4. Debug
(starts with clients specifications)
Design Phase - Ans--Get specifications from the client (user) in order to design;
Involves coming up a plan for making the software and breaking down large problems
into smaller ones (modular design).
Specifications - Ans--What the program(s) should do, also considered as requirements.
Implementation Phase - Ans--Coding specific parts of a program, coding methods.
Unit Test - Ans--Test individual piece of software (methods) to see if they work on own.
Integration Test - Ans--When all unit tests are done, put it all together and see if it
works.
Debugging Phase - Ans--Developers attempt to fix problems—may be going back to
design phase and through testing again.
Software Documentation - Ans--Written text and visual material that describes the
software—when the project is done, it describes what the program does and how the
software works. 3 Main kinds: 1. comments that appear in the code, 2. notes that
appear while the program is running, 3. user notes or instruction manual supplied with
software.
Software Efficiency - Ans--Time efficiency (time it takes to complete a task) & Space
efficiency (amount of memory needed).
Modular Design - Ans--Module is a logically independent unit that handles a task. Good
because it makes a large project more manageable, speeds up project, increases re-
usability of software.
Top-Down Design - Ans--Process of repeatedly breaking large algorithms down into
smaller modules.
Entry Conditions - Ans--State of the software before a method is run.
, Exit Conditions - Ans--State of the software after a method runs.
Bottom-Up Development - Ans--Goes with top-down design, building methods at the
lowest level—can assign to different people. Then put those together to build higher
level methods.
Testing Phase - Ans--Seeing if the code works properly, according to specs—first unit
test, then integration test.
3 major elements of logical structure - Ans--Linear Sequences
Selection Sequences (Branching)
Repetition Sequences (Looping)
Linear Sequence - Ans--Element of a logic structure that must be completed correctly
and in order
Selection Sequence - Ans--This sequence occurs when the flow of instructions in a
program splits into separate paths
Binary Bypass - Ans--A binary branching routine in which an instruction or set of
instructions is either executed or not.
Binary Choice - Ans--A binary branching routine in which one of two instructions, but not
both, is executed.
If/Else - Ans--The tiles in Alice which implements a selection sequence.
Repetition Sequence - Ans--This sequence occurs whenever a branch in an algorithm
leads back to a previous instruction, instead of forward to a new instruction.
Body of the Loop - Ans--The set of instructions to be repeated in a loop.
Infinite Loop - Ans--A loop that never ends.
Pretest Loop - Ans--A loop that has the test come before the body of the loop.
Posttest Loop - Ans--A loop that has the test come after the body of the loop.
Sentinel - Ans--A marker or condition that tells the computer when to stop executing the
loop.
Count-controlled loop - Ans--A loop that only executes a certain amount of times.
Initialization - Ans--An instruction that sets the first value of the control variable in a
count-controlled loop.
EXAM QUESTIONS AND CORRECT
ANSWERS
Algorithm - Ans--A set of clear, easy to follow instructions for accomplishing some task.
(In programming we call these steps "methods")
Software Development Cycle - Ans--1. Design - 2. Implement - 3. Test - 4. Debug
(starts with clients specifications)
Design Phase - Ans--Get specifications from the client (user) in order to design;
Involves coming up a plan for making the software and breaking down large problems
into smaller ones (modular design).
Specifications - Ans--What the program(s) should do, also considered as requirements.
Implementation Phase - Ans--Coding specific parts of a program, coding methods.
Unit Test - Ans--Test individual piece of software (methods) to see if they work on own.
Integration Test - Ans--When all unit tests are done, put it all together and see if it
works.
Debugging Phase - Ans--Developers attempt to fix problems—may be going back to
design phase and through testing again.
Software Documentation - Ans--Written text and visual material that describes the
software—when the project is done, it describes what the program does and how the
software works. 3 Main kinds: 1. comments that appear in the code, 2. notes that
appear while the program is running, 3. user notes or instruction manual supplied with
software.
Software Efficiency - Ans--Time efficiency (time it takes to complete a task) & Space
efficiency (amount of memory needed).
Modular Design - Ans--Module is a logically independent unit that handles a task. Good
because it makes a large project more manageable, speeds up project, increases re-
usability of software.
Top-Down Design - Ans--Process of repeatedly breaking large algorithms down into
smaller modules.
Entry Conditions - Ans--State of the software before a method is run.
, Exit Conditions - Ans--State of the software after a method runs.
Bottom-Up Development - Ans--Goes with top-down design, building methods at the
lowest level—can assign to different people. Then put those together to build higher
level methods.
Testing Phase - Ans--Seeing if the code works properly, according to specs—first unit
test, then integration test.
3 major elements of logical structure - Ans--Linear Sequences
Selection Sequences (Branching)
Repetition Sequences (Looping)
Linear Sequence - Ans--Element of a logic structure that must be completed correctly
and in order
Selection Sequence - Ans--This sequence occurs when the flow of instructions in a
program splits into separate paths
Binary Bypass - Ans--A binary branching routine in which an instruction or set of
instructions is either executed or not.
Binary Choice - Ans--A binary branching routine in which one of two instructions, but not
both, is executed.
If/Else - Ans--The tiles in Alice which implements a selection sequence.
Repetition Sequence - Ans--This sequence occurs whenever a branch in an algorithm
leads back to a previous instruction, instead of forward to a new instruction.
Body of the Loop - Ans--The set of instructions to be repeated in a loop.
Infinite Loop - Ans--A loop that never ends.
Pretest Loop - Ans--A loop that has the test come before the body of the loop.
Posttest Loop - Ans--A loop that has the test come after the body of the loop.
Sentinel - Ans--A marker or condition that tells the computer when to stop executing the
loop.
Count-controlled loop - Ans--A loop that only executes a certain amount of times.
Initialization - Ans--An instruction that sets the first value of the control variable in a
count-controlled loop.