0% found this document useful (0 votes)
2 views2 pages

1.7 Software Development-Notes

The document discusses key concepts in software development, including decomposition, iteration, and iterative development. It emphasizes the importance of breaking down complex problems into manageable parts and testing programs with various types of data to ensure reliability. Additionally, it provides a test plan for a program that identifies the largest and smallest of four user-inputted numbers, detailing normal, boundary, and invalid test cases.

Uploaded by

g7033097
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

1.7 Software Development-Notes

The document discusses key concepts in software development, including decomposition, iteration, and iterative development. It emphasizes the importance of breaking down complex problems into manageable parts and testing programs with various types of data to ensure reliability. Additionally, it provides a test plan for a program that identifies the largest and smallest of four user-inputted numbers, detailing normal, boundary, and invalid test cases.

Uploaded by

g7033097
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

7 Software development
Notes
1. What is meant by decomposition in software development?
Answer: Decomposition is the process of breaking a complex problem or system into
smaller, more manageable sub-problems.

2. Why is decomposition important in software development?


Answer: Decomposition allows a large problem to be split into smaller sub-problems,
enabling teams or individuals to work on different parts simultaneously. This improves
efficiency, leverages specialist skills, and results in higher-quality solutions that can be
integrated later.

3. How can a problem be decomposed?


Answer: A problem can be decomposed by identifying its main tasks and breaking them into
smaller, logical steps or modules that can be solved independently.

4. What does iteration mean in computing?


Answer: Iteration refers to the process of repeating a set of instructions or steps until a
specific condition is met.

5. What is iterative development?


Answer: Iterative development is a software development approach where the solution is
built and improved through repeated cycles (iterations), allowing for testing and refinement
at each stage.

6. What are the three types of test data used in a test plan?
Answer: To test a program thoroughly means testing it with a range of data:
• Normal test data: Data within the expected range that should be accepted.
• Invalid test data: Data outside the allowed range that should be rejected.
• Boundary test data: Data at the limits of the valid range, used to check edge cases.

7. Why do you test a program multiple times?


Answer: Testing a program multiple times ensures that it works correctly under different
conditions and helps identify errors that may occur with various inputs.

8. Why do you test a program with different types of data?


Answer: Using different types of test data (normal, invalid, and boundary) ensures the
program handles all possible scenarios, including valid inputs, invalid inputs, and edge
cases.
9. The following program takes four numbers as input from the user and outputs the largest
number and the smallest number. Create and complete a test plan for this program. Include
a range of data.
number = int(input(“Enter the first number”))
smallest = number
largest = number
number = int(input(“Enter the second number”))
if number > largest:
largest = number
if number < smallest:
smallest = number
number = int(input(“Enter the third number:”))
if number > largest:
largest = number
if number < smallest:
smallest = number
number =int(input(“Enter the fourth number:”))
if number > largest:
largest = number
if number <smallest:
smallest = number
print(“The largest number input was”, largest)
print(“The smallest number input was”, smallest)
Answer:

Test data type Description Example inputs Expected outputs


Normal Input from 1 to 100 allowed 5, 12, 7, 9 Largest = 12; Smallest
=5
Normal Input from 1 to 100 allowed 10, 10, 10, 10 Largest = 10; Smallest
= 10
Normal Input from 1 to 100 allowed 0, 0, 5, -1 Largest = 5; Smallest =
-1
Boundary Input from 1 to 100 allowed 0, 1, -1, 0 Largest = 1; Smallest =
-1
Boundary Input from 1 to 100 allowed -1, -1, -1, 0 Largest = 0; Smallest =
-1
Invalid Input from 1 to 100 allowed 1, "3.5", 2, 4 Error: ValueError on
second input
Invalid Input from 1 to 100 allowed 1, "", 2, 3 Error: ValueError on
second input
Invalid Input from 1 to 100 allowed 1, 2, "one", 4 Error: ValueError on
third input

You might also like