Advanced concepts in Analysis, Design, Implementation, Testing, and Evaluation.
1. Methodologies & Analysis
Development Models
A structured approach following the waterfall stages (Analysis, Design, Implementation, Testing, Evaluation) but allows revisiting previous stages.
- Structure: Predictive and rigid. Heavy documentation.
- Process: Finish one stage completely before moving to the next.
- Revisiting: If testing fails, the team loops back to Analysis or Design to fix issues.
- Sprints: Short dev cycles (2-4 weeks).
- Deliverable: Working software at end of every sprint.
- Stand-ups: Daily progress meetings.
- Product Owner: Client representative.
- Scrum Master: Removes blockers.
- Backlog: Prioritized list of tasks.
Analysis Requirements
What the software must DO (Inputs, Processes, Outputs).
Constraints/Performance.
- Performance: Speed, load time.
- Security: Encryption standards.
- Usability: Accessibility features.
2. Design & Data
Design
Planning the code logic.
- Pseudocode: English-like structured text describing the algorithm.
- Structure Diagram: Visual hierarchy of the program's modules/functions.
- Data Flow: Shows how variables move between sub-programs (In/Out).
- Wireframes: Visual sketch of the User Interface (UI).
Data Structures
Separate arrays linked by index.
ages = [17, 16]
# names[0] is linked to ages[0]
A custom data type (Record/Class) holding related fields.
name: str
age: int
pupilArray = [Pupil("Ali", 17), Pupil("Bo", 16)]
Variable Scope
- Declared in main program.
- Visible everywhere (all functions).
- Risk: Can be accidentally changed by any function. Inefficient RAM use (stay in memory).
- Declared inside a function/sub-program.
- Only visible inside that function.
- Benefit: Modularity. Same variable name can be reused safely in other functions. Efficient RAM.
3. Implementation (Coding)
Modularity & Params
Parameters pass data to sub-programs, making them independent and reusable (avoiding Global Variables).
- Procedure: Performs a task. No return value.
- Function: Returns a single value.
def add(a, b):
x = add(10, 50)
Algorithms
target = "Bo"
found = False
for name in names:
if name == target:
found = True
# break
target = 1
count = 0
for score in scores:
if score == target:
count = count + 1
print(count)
maximum = ages[0]
for i in range(1, len(ages)):
if ages[i] > maximum:
maximum = ages[i]
print(maximum)
File Handling (Python)
file = open("data.csv", "r")
names = []
ages = []
line = file.readline()
while line != "":
data = line.strip().split(",")
names.append(data[0])
ages.append(int(data[1]))
line = file.readline()
file.close()
def __init__(self, n, a):
self.name = n
self.age = a
file = open("data.csv", "r")
pupilArray = []
line = file.readline()
while line != "":
data = line.strip().split(",")
temp = Pupil(data[0], int(data[1]))
pupilArray.append(temp)
line = file.readline()
file.close()
ages = [17, 16]
# 1. OPEN ("w" for Write)
file = open("output.csv", "w")
for i in range(len(names)):
# Construct CSV string
line = names[i] + "," + str(ages[i]) + "\n"
file.write(line)
# 2. CLOSE
file.close()
file = open("output.csv", "w")
for p in pupilArray:
# Access fields from object p
line = p.name + "," + str(p.age) + "\n"
file.write(line)
file.close()
4. Testing & Evaluation
Testing
- Normal: Expected range.
- Extreme: Boundaries.
- Exceptional: Invalid/Wrong type.
- Dry Run: Manual trace on paper.
- Trace Table: Tracking variable values row by row.
- Breakpoints: Pause execution to check state.
- Watchpoints: Monitor specific variables.
Evaluation
Does it meet ALL Functional Requirements?
Does it use loops/arrays effectively? Does it waste RAM?
Can it handle errors without crashing? (Input validation, Try/Except).
Is it easy to update? (Modular code, Comments, Meaningful names).