Competency 004
Competency 005
Competency 006
Design to Implementation
Robust Code & Testing
100

Which list gives the phases of the software system life cycle in the correct order?

A. Design, analysis, coding, testing, maintenance

B. Coding, debugging, documentation, delivery

C. Analysis, design, implementation, testing, deployment, maintenance

D. Planning, coding, deployment, and then the cycle ends

What is C?

Maintenance generates new requirements that feed back into analysis and design, which is what makes the life cycle cyclical rather than a straight line. A puts design before analysis. B omits analysis and design entirely. D treats deployment as the end of a one-way process.

100

What does IDE stand for, and which tools would you expect it to bundle?

A. Integrated Development Environment; editor, compiler or interpreter, and debugger

B. Integrated Design Environment; flowchart and UML editors

C. Interactive Debugging Engine; breakpoints and watches only

D. Internal Data Exchange; version control and file sharing

What is A, an Integrated Development Environment?

An IDE puts the editor, build tools, and debugger in one workspace so students can write, run, and fix code without switching programs. B and D expand the acronym incorrectly. C names real features but describes only a debugger, and it is not what IDE stands for.

100

Which statement correctly distinguishes compiled from interpreted languages?

A. Compiled code is translated line by line as it runs; interpreted code is translated all at once beforehand

B. Only compiled languages must be translated into machine code

C. Interpreted languages run faster because no translation is needed

D. Compiled languages translate the whole program before execution; interpreted languages translate it as it runs

What is D?

A compiler translates the entire program up front and produces an executable (C, C++, Java); an interpreter translates during execution (Python, JavaScript, Ruby), which speeds up testing but usually runs slower. A reverses the two definitions. B is false because both must reach machine code. C is wrong on both counts.

100

What is a design specification, and when is it written?

A. A list of syntax errors, written after the first test run

B. A statement of the program's required inputs, outputs, and behavior, written before coding begins

C. The user manual, written after deployment

D. The flowchart, written only for object-oriented programs

What is B?

The specification defines what the program must do before anyone decides how to build it, and it becomes the standard the finished program is validated against. A describes compiler or test output. C documents a finished product. D confuses one optional visual organizer with the specification, and flowcharts are not limited to one paradigm.

100

A team adopts a standardized programming style. Which of these is NOT a style convention?

A. Indenting the body of every loop and if statement

B. Using identifiers such as totalScore instead of ts

C. Writing a header comment giving each method's purpose, parameters, and return value

D. Choosing which sorting algorithm the program will use

What is D?

Picking an algorithm is a design and efficiency decision; style conventions govern spacing, indentation, descriptive identifiers, comments, and documentation. A, B, and C are all conventions that make code readable to whoever maintains it next.

200

A Vehicle class stores wheels and topSpeed. A Car class reuses both and adds doors and sunroof. Which concept does this illustrate?

A. Inheritance

B. Encapsulation

C. Polymorphism

D. Abstraction

What is A, inheritance?

A sub-class extends and specializes a super-class, reusing its attributes and methods. B hides internal data behind public methods. C lets one interface work with many types. D strips away detail to expose only what matters. None of those three creates the parent-child relationship shown.

200

A working program has three methods containing the same 20 lines. The student rewrites it so those lines live in one method the others call, and the output never changes. What is this called?

A. Debugging

B. Recursion

C. Compiling

D. Refactoring

What is D, refactoring?

Refactoring restructures internal code without changing external behavior, which is why the output stays the same while maintenance gets easier. A repairs a defect, and there was no defect here. B is a method that calls itself. C translates source code into machine code.

200

Which statement about low-level and high-level languages is correct?

A. High-level languages are closer to machine code than low-level languages

B. Low-level languages use instructions that map closely to the processor; high-level languages use human-readable statements that must be translated

C. Low-level languages cannot be translated into machine code

D. High-level languages always execute faster than low-level languages

What is B?

Assembly and machine code sit close to the hardware, while Python, Java, and C++ use readable statements that a compiler or interpreter must translate. A reverses the scale. C is false, since an assembler does exactly that. D is generally the opposite, because low-level code can be hand-tuned for speed.

200

You have a design specification for a school store program. Besides the data types, which of these should you identify before writing code?

A. The number of lines the finished program will require

B. The processor and operating system of every user

C. The objects needed, the subtasks to perform, and reusable components in existing code

D. The final variable names, chosen before the subtasks are known

What is C?

Naming the objects, splitting the work into subtasks, and finding code you can reuse turns a specification into an implementation plan and keeps you from rewriting what already exists. A is neither predictable nor useful. B matters for deployment, not design. D reverses the order, since identifiers follow from the subtasks they serve.

200

A program asks for a test score and the user types the word eighty. Which choice best describes the problem and the fix?

A. Type mismatch; validate the input before converting it and re-prompt on bad input

B. Syntax error; recompile the program

C. Logic error; redesign the algorithm

D. Nothing to fix; the program should crash so the user learns

What is A?

Text cannot be converted to a number, so an unguarded conversion throws a runtime error; a robust program checks the input first, reports the problem, and asks again. B is wrong because the source code is legal. C is wrong because the algorithm is fine. D ignores the goal of handling anticipated errors gracefully.

300

In a flowchart, which pairing of symbol to meaning is correct?

A. Diamond = process step; rectangle = decision

B. Oval = decision; parallelogram = start or stop

C. Arrow = process step; rectangle = input or output

D. Rectangle = process step; diamond = decision

What is D?

A rectangle is a process, a diamond is a decision with branching paths, an oval marks start or stop, and a parallelogram is input or output. A reverses the two most common shapes. B swaps the oval and the parallelogram. C confuses flow lines, which only show sequence, with processing.

300

A program compiles, runs to completion, and reports an average of 0 for a class of 20 students. What type of error is this?

A. Syntax error

B. Logic error

C. Runtime error

D. Compile-time error

What is B, a logic error?

The code is legal and it finishes, so the fault is in the algorithm (likely dividing inside the loop or dividing by the wrong count). Logic errors produce no error message and must be found by tracing or stepping through the code. A and D would stop the program from running at all. C would halt execution partway with a reported error.

300

Which pairing of term to examples is correct?

A. Data type: int, double, boolean. Data structure: array, list, stack, queue

B. Data type: array, list, stack. Data structure: int, double, boolean

C. The two terms mean the same thing

D. A data structure can hold only one data type in any program

What is A?

A data type defines what kind of value a single variable holds; a data structure organizes a collection of values and defines how they are stored and accessed. B swaps the two lists. C erases a distinction the exam tests directly. D is false, since objects and records hold values of mixed types.

300

Which set best describes collaborative strategies for developing a complex software system?

A. Having the strongest programmer write every module alone

B. Waiting until all requirements are final before anyone writes code

C. Giving each student a separate program so nothing has to be integrated

D. Design and implementation teams, software validation and testing, and risk assessment

What is D?

Teams divide work behind defined interfaces, validation and testing confirm the result meets the specification, and risk assessment surfaces threats early enough to absorb them. A abandons collaboration and creates a single point of failure. B turns uncertainty into guaranteed delay. C avoids collaboration instead of managing it.

300

A program accepts scores from 0 to 100. Which test set is strongest?

A. 50 and 75 only

B. Only invalid values such as -20 and 250

C. Valid data, invalid data, and the boundaries -1, 0, 1, 99, 100, and 101

D. One value, since the same code path handles them all

What is C?

Defects cluster at the edges of an allowed range, so testing valid data, invalid data, and the values on either side of each limit catches off-by-one comparisons such as using < where <= belongs. A tests only the easy middle. B never confirms correct behavior. D assumes the very thing testing is supposed to verify.

400

A student uses a sort method knowing only its parameters and return value, not its internal code. Which design approach is this, and what is its main benefit?

A. Top-down design; it speeds up execution

B. Black box design; the module can be used without understanding its implementation

C. Bottom-up design; it removes the need for testing

D. Step-wise refinement; it guarantees no runtime errors

What is B?

Black box design hides internal workings and exposes only inputs and outputs, so a module can be used, replaced, or rewritten without breaking the code that calls it. A and D are real strategies, but they describe decomposition, and neither changes execution speed or eliminates runtime errors. C reverses the direction and makes a false claim about testing.

400

Which statement about software development models is accurate?

A. The waterfall model repeats every phase on each cycle

B. Agile models skip testing in order to deliver faster

C. In the spiral model, each cycle includes risk analysis before the next round of design and building

D. The incremental model delivers the entire system only at the very end

What is C?

The spiral model is risk-driven: every loop analyzes risk, then designs, builds, and evaluates a portion of the system. A describes iterative models; waterfall passes through each phase once. B is false, because agile tests continuously. D describes waterfall delivery, not incremental delivery.

400

A teacher has students plan a lunch-ordering app by listing the menu, the order form, the total, and the receipt as separate parts to build. Which core concept of computational thinking is she modeling?

A. Abstraction

B. Pattern recognition

C. Automation

D. Decomposition

What is D, decomposition?

Breaking one large problem into smaller parts that can be built and tested separately is decomposition; the four core concepts are decomposition, pattern recognition, abstraction, and algorithms. A removes unnecessary detail to generalize. B looks for similarities across parts. C is not one of the four.

400

How do the procedural and object-oriented paradigms differ?

A. Procedural organizes the solution as procedures acting on separate data; object-oriented organizes it as objects bundling data with methods

B. Procedural programs cannot use loops; object-oriented programs can

C. Procedural languages are always interpreted; object-oriented languages are always compiled

D. Only object-oriented languages can be used for large programs

What is A?

Procedural code (C, Pascal) passes data to functions; object-oriented code (Java, C++) keeps data together with the methods that act on it and adds encapsulation, inheritance, and polymorphism. B is false, since both use the same control structures. C confuses paradigm with translation method. D is an overstatement, not a difference.

400

Which testing practice best matches step-wise refinement?

A. Writing the entire program, then running it once at the end

B. Building and verifying the program in small increments, refining each part before adding the next

C. Testing only the parts the teacher will grade

D. Running the program repeatedly with the same input until it works

What is B?

Refining and verifying in stages means a new defect is almost always in the piece you just added, which is why classes, methods, and libraries are also tested in isolation. A makes the source of a defect nearly impossible to isolate. C leaves untested code in a finished program. D is trial and error, and the same input cannot reveal new behavior.

500

In a UML class diagram, what do the three stacked compartments of a class box contain, from top to bottom?

A. Methods; attributes; class name

B. Class name; methods; relationships to other classes

C. Attributes; methods; inheritance arrows

D. Class name; attributes; methods

What is D?

The top compartment holds the class name, the middle lists attributes with their data types, and the bottom lists methods with parameters and return types; a minus sign marks private members and a plus sign marks public ones. A inverts the order. B and C place relationships or inheritance arrows inside the box, but those are drawn between class boxes, not within one.

500

Which pairing of an IDE tool with its job is correct?

A. The debugger lets you pause execution and inspect variable values as the program runs

B. The compiler window reports logic errors with line numbers

C. Syntax highlighting proves a program produces correct output

D. Auto-indentation fixes runtime errors

What is A?

The debugger is the only tool listed that shows the program's state during execution, which is how logic errors are located. B is wrong because compilers report syntax errors, not logic errors. C only helps you read the code. D changes layout and cannot change behavior.

500

A method receives a variable and changes it, but the change is NOT visible to the caller. Which choice best explains why?

A. The variable was passed by reference

B. The method was declared void

C. The variable was passed by value, so the method modified a copy

D. The variable was declared as a constant

What is C?

Pass by value hands the method a copy, so assignments inside the method leave the caller's variable untouched; pass by reference hands over the memory address, so changes do persist. A would make the change visible. B controls what is returned, not whether arguments are copied. D would keep the change from compiling at all.

500

A flowchart sets x to 0, then reaches a decision that asks x < 10? If true it prints Do task, adds 1 to x, and the arrow returns to the decision; if false it exits. Which pseudocode matches the flowchart?

A. A single if statement that prints once when x < 10

B. A while loop that tests x < 10, prints, and increments x

C. A loop that prints ten times but never changes x

D. An if nested inside an if, with no repetition

What is B?

An arrow that returns to a decision is a loop, and with the test at the top and the increment inside the body it is a while loop that runs ten times. A executes once and ignores the return arrow. C leaves out the increment, which would loop forever. D has no repetition at all. (Bonus: write it as pseudocode in Praxly.)

500

Which method is best suited for a reusable code library?

A. double areaOfMyCircle() that uses a radius stored in a global variable

B. void doEverything() that reads input, calculates, and prints the results

C. double circleArea(double radius) that returns the area and documents its parameter

D. A method that prints the result directly and returns nothing

What is C?

Library code should take its values as parameters, perform one well-defined task, return a result, and document its interface so callers never depend on the implementation. A hides a dependency on global state. B does too many things to be reused. D mixes computation with output, so it cannot be used anywhere a different format is needed.

M
e
n
u