COMP-119 · Lesson 6 of 12 · 24 min
Review: software development concepts
▶ Video coming soon A video version of this lesson is on the way.
Software development concepts is the domain Noor rated lowest at the start, a 2, and it is the one where most Tech+ candidates from support backgrounds feel least at home. The good news, Lorna tells her, is that the exam does not ask anyone to write a working program. It asks candidates to recognize the categories of programming languages, understand the building blocks every program uses, read simple logic in pseudocode or a flowchart, and know what terms such as variable, array, function and object mean. Those are concepts, and concepts can be learned in a few focused weeks. The domain is worth about 13 or 14 in every 100 points, roughly nine or ten questions, and every one of them is answerable without any coding experience.
What domain 4 covers
The domain has four main areas. The first is programming language categories: how compiled, interpreted, query, assembly and markup languages differ. The second is programming organizational techniques and logic: pseudocode, flowcharts, and the three basic structures of sequence, branching and looping. The third is the purpose and use of programming concepts: identifiers such as variables and constants, data types, containers such as arrays, and functions. The fourth is objects: what properties, attributes and methods are. COMP-111 lessons 1 to 4 taught these from the beginning. This lesson concentrates on recognition, because that is what the questions test.
Language categories
A compiled language is translated in advance by a compiler into machine code, producing a file that runs directly on the processor; C, C++, Rust and Go are common examples, and compiled programs usually run fast. An interpreted language is run line by line by an interpreter at the moment the program is executed; Python and JavaScript are the classic examples, and they are quick to write and test. In practice many modern languages, including Java and C#, use a middle approach in which code is compiled into an intermediate form that a runtime then executes. Exam questions stay with the simple distinction: compiled in advance into a standalone program, or interpreted at run time.
Three other categories complete the picture. A query language asks a database for data; SQL is the standard example, with statements such as SELECT. An assembly language uses short mnemonic words that map almost one-to-one onto a processor's machine instructions, and is used where precise control matters, such as in firmware. A markup language, such as HTML or XML, describes the structure and presentation of content rather than giving step-by-step instructions, so strictly it is not a programming language at all. Scripting languages, such as PowerShell and Bash, are interpreted languages used to automate tasks.
| Category | How it runs or what it does | Examples |
|---|---|---|
| Compiled | Translated in advance into machine code | C, C++, Rust, Go |
| Interpreted | Run line by line by an interpreter at run time | Python, JavaScript |
| Scripting | Interpreted, used to automate tasks | PowerShell, Bash |
| Query | Asks a database for data | SQL |
| Assembly | Mnemonics close to machine instructions | x86 or ARM assembly |
| Markup | Describes structure and presentation of content | HTML, XML |
Sequence, branching and looping
Every program, however large, is built from three structures. Sequence means instructions run one after another in order. Branching, also called selection or a conditional, means the program chooses between paths based on a condition, as in "if the item is overdue, add a fine; otherwise, do nothing". Looping, also called iteration, means a block of instructions repeats, either a set number of times or while a condition stays true, as in "for each item on the patron's account, check whether it is overdue". Exam questions describe a situation and ask which structure it uses, or show a short piece of pseudocode and ask what happens.
Pseudocode is a plain-language outline of a program that uses programming-like structure without the strict rules of a real language. A flowchart shows the same logic as a diagram: ovals for start and end, rectangles for actions, diamonds for decisions with yes and no arrows, and parallelograms for input and output. Questions often show a small flowchart and ask what it outputs for a given input, so practice following one by hand.
Worked problem
Tracing a flowchart
Using the late fee flowchart, what does it output for an item 12 days late, and for an item 0 days late?
Show solution
- 12 days late: the first decision (is days late greater than 0?) is yes.
- The fine is calculated as 12 × 0.25 = 3.00.
- The second decision (is the fine greater than 5?) is no, so the fine stays at 3.00, and the flowchart outputs 3.00.
- 0 days late: the first decision is no, so the flowchart outputs "no fine" and ends without calculating anything.
Answer: 3.00 for 12 days late; no fine for 0 days late. An item 30 days late would be capped at 5.00.
Reading pseudocode under time pressure
Pseudocode questions reward a slow, written trace rather than a quick mental guess. The technique is simple. Write each variable's name across the top of a scrap of the digital whiteboard (or paper at a test center, if the center provides it), then step through the lines one at a time, crossing out the old value and writing the new one each time a variable changes. When the pseudocode loops, keep a tally of how many times the loop has run and check the loop's condition before each pass, not after. Most errors in these questions come from running a loop one time too many or too few, and a written tally prevents that.
Worked problem
Tracing a loop in pseudocode
What does this pseudocode display? "SET count TO 0. SET total TO 0. WHILE count IS LESS THAN 4: ADD 3 TO total; ADD 1 TO count. END WHILE. DISPLAY total."
Show solution
- Before the loop: count is 0 and total is 0.
- Pass 1: count (0) is less than 4, so total becomes 3 and count becomes 1.
- Pass 2: count (1) is less than 4, so total becomes 6 and count becomes 2. Pass 3: total becomes 9 and count becomes 3.
- Pass 4: count (3) is less than 4, so total becomes 12 and count becomes 4. Now count (4) is not less than 4, so the loop stops and the program displays total.
Answer: It displays 12: the loop runs four times, adding 3 each time.
Two other patterns are worth recognizing. A loop whose condition never becomes false runs forever; this is called an infinite loop, and in a scenario it shows up as a program that freezes or never finishes. A branch with several conditions checked in order, often written IF, ELSE IF, ELSE, stops at the first condition that is true, so the order of the conditions matters. If a question asks why a program gave the wrong category for a value, check whether an earlier, broader condition caught the value before the intended one could.
Noor finds that the best practice for this domain is the opposite of what she expected. Instead of reading more about programming, she writes tiny pieces of pseudocode about her own work: checking a patron's account, counting returns at the end of a shift, deciding whether a hold should be sent to another branch. Turning familiar tasks into sequence, branches and loops makes the vocabulary feel like a description of things she already does, which is exactly the point.
Identifiers, data types and containers
An identifier is a name a program uses for something it stores. A variable is a named value that can change while the program runs, such as the number of items a patron has borrowed. A constant is a named value that does not change, such as the maximum number of items allowed. Data types describe what kind of value is stored. A character (char) is one letter or symbol; a string is a sequence of characters, such as a patron's name; an integer is a whole number; a floating-point number has a decimal part, such as 2.75; and a Boolean is either true or false. Choosing the right type matters: a phone number is better stored as a string than an integer, because it may start with zero and is never used in arithmetic.
Containers hold several values under one name. An array holds a fixed-size, ordered list of values of the same type, each reached by its position, usually starting at zero. A vector, or a list in some languages, is like an array but can grow and shrink. A function is a named, reusable block of code that may take inputs, called parameters or arguments, and may return a result; calling the same function from many places avoids repeating code. The short Python program below uses all of these ideas at once, which is a good way to see them working together.
MAX_ITEMS = 10 # a constant
patron = "Ruth Ingram" # a string variable
days_late = [0, 3, 12, 30] # a list (a container) of integers
is_member = True # a Boolean
def late_fee(days): # a function with one parameter
fee = days * 0.25 # a floating-point result
if fee > 5: # branching
fee = 5.0
return fee
total = 0.0
for d in days_late: # looping over the container
total = total + late_fee(d)
print(patron, "owes", total)
print("Item limit:", MAX_ITEMS, "Member:", is_member)Ruth Ingram owes 8.75 Item limit: 10 Member: True
What this code does
The program stores a patron's name, a list of how many days four items are overdue, and a yes-or-no value saying the patron is a member. A small reusable rule works out the fee for each item at 0.25 per day, capped at 5, and a loop goes through the four items adding the fees together. The output shows the patron's total (0 + 0.75 + 3.00 + 5.00 = 8.75) and then the fixed item limit and membership value, showing a string, numbers and a true-or-false value side by side.
Objects, properties and methods
Object-oriented programming groups data and the actions that work on it into objects. An object is built from a template called a class. Properties, also called attributes in many explanations, are the data an object holds, such as a book object's title, author and due date. Methods are the actions an object can perform, such as a book object's renew or check-in actions. Tech+ uses both "properties" and "attributes" in its objectives, so treat them as describing the data side of an object, while methods are always the behavior side. If a question asks which part of an object describes it, the answer is a property or attribute; if it asks which part makes it do something, the answer is a method.
| Concept | What it is | Library example |
|---|---|---|
| Variable | A named value that can change | Number of items on loan |
| Constant | A named value that does not change | Maximum items allowed |
| Array or list | Several values under one name | Due dates for each item |
| Function | A reusable, named block of code | Calculate a late fee |
| Object property | Data an object holds | A book's title and due date |
| Object method | An action an object performs | Renew a book |
How domain 4 questions are built
Most questions in this domain take one of four shapes. Some name a language and ask its category. Some describe a situation and ask which structure or concept it needs, such as "a program must repeat an action for every record" (a loop). Some show a few lines of pseudocode or a flowchart and ask for the result. Some ask which data type suits a value, such as a true-or-false setting (Boolean) or a price with cents (floating point). Lorna suggests practicing each shape with a handful of examples until the vocabulary feels ordinary, and writing a tiny glossary in her own words, because explaining a term is the best test of understanding it.
Version control appears in the course material as a useful idea even though it sits at the edge of the Tech+ objectives. Tools such as Git keep a history of every change to a program, let several people work on it at once and allow a team to return to an earlier version when something breaks. If a question mentions tracking changes to code over time, version control is the concept.
Common mistakes
MistakeCalling HTML a programming language.
InsteadHTML is a markup language that describes structure, not step-by-step instructions.
MistakeStoring phone numbers as integers.
InsteadUse strings for values that are not used in arithmetic and may start with zero.
MistakeConfusing properties with methods.
InsteadProperties or attributes are data; methods are actions.
MistakeAssuming interpreted languages must be slow and useless for real work.
InsteadThe distinction is when translation happens, not quality.
MistakeRushing through flowcharts in your head.
InsteadTrace them step by step, writing values down.
Summary and key terms
- Tech+ asks for recognition of software concepts, not the ability to write programs.
- Compiled languages are translated in advance; interpreted languages run through an interpreter at run time.
- SQL is a query language, assembly is close to machine code and HTML is markup.
- Programs are built from sequence, branching and looping, shown in pseudocode or flowcharts.
- Variables change, constants do not, and data types include char, string, integer, float and Boolean.
- Objects hold properties or attributes (data) and methods (actions).
- Compiled language
- A language translated into machine code before the program runs.
- Interpreted language
- A language run by an interpreter as the program executes.
- Pseudocode
- A plain-language outline of program logic.
- Boolean
- A data type with only two values, true and false.
- Array
- A container holding several values under one name, reached by position.
- Function
- A named, reusable block of code that may take inputs and return a result.
- Method
- An action that an object can perform.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Is Python usually described as compiled or interpreted?
Show answer
Interpreted.
Which language category does SQL belong to?
Show answer
Query language.
A program must check every item on an account. Which structure does it need?
Show answer
A loop.
Which data type suits a setting that is either on or off?
Show answer
Boolean.
What is the difference between a variable and a constant?
Show answer
A variable's value can change while the program runs; a constant's cannot.
A book object has a title. Is the title a property or a method?
Show answer
A property (attribute).
Which flowchart shape shows a decision?
Show answer
A diamond.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.