← Unit 7: Software Development & the CPT
ICS3U · Unit 7 test review
Software Development & the CPT: Test Review
Everything for the Unit 7 test on one page: the key facts from all 7 lessons, the mistakes that cost the most marks, and a practice test that points you back to the lessons you need.
Key facts
The Software Development Life Cycle
- The stages are analysis, design, implementation, testing and maintenance — in that order, and maintenance loops back to analysis.
- A requirement must be checkable: if you cannot name a test for it, rewrite it.
- Functional requirements say what the program does; non-functional say how well it must do it.
- Waterfall completes each stage once; iterative repeats all the stages on small slices to get feedback early.
- A defect found after release costs roughly 30 times what it costs at the analysis stage.
- Maintenance consumes the majority of a successful program's total effort.
Problem-Solving, Pseudocode and Algorithm Design
- Decomposition splits a problem into independent sub-problems; pattern recognition spots the ones you have already solved.
- Abstraction means deliberately ignoring detail that does not affect the solution.
- An IPO chart lists inputs, processing and outputs, and exposes values that were never actually supplied.
- Pseudocode is structured English with no syntax rules; it exists so the logic can be checked cheaply.
- In a flowchart, a diamond is a decision and must have exactly two exits, both of which lead somewhere.
- Boundary words in a specification — inclusive, at least, up to — decide between
<and<=.
Testing, Debugging and Documentation
- Every test set needs normal, boundary and invalid cases; boundary cases find the most bugs.
- Test the boundary value, one below it and one above it — that is where
<and<=disagree. - Syntax errors stop compilation, runtime errors stop execution, logic errors produce a wrong answer in silence.
- A stack trace gives the exception type, the message, and the exact file and line where it stopped.
- A trace table finds logic errors by executing the code by hand exactly as written.
- Comments should explain why, not what; the code already says what.
Code Style, Conventions and Maintainable Code
- Classes use UpperCamelCase, methods and variables use lowerCamelCase, and constants use UPPER_SNAKE_CASE.
- Indent one level (usually four spaces) per block so the layout on screen matches the logic.
- Replace magic numbers with
finalnamed constants, declared once, so a change of value is a one-line edit. - Comments explain WHY; every file gets a header comment and every method a Javadoc comment (
/** ... */with@paramand@return). - Refactoring changes structure without changing behaviour: one small change at a time, re-testing after each.
- Commit small, working versions with messages that say what changed and why, and use branches for risky changes.
The Culminating Project, Society and Careers
- Scope a project by sorting features into must, should, could and will-not have, and build strictly in that order.
- A milestone must be provable by running something, not by an estimate of how complete it feels.
- Reserve about a fifth of your time for testing, fixing and documentation.
- Manufacturing a device usually costs more energy than the electricity it will consume in its whole life, so extending lifespan is the strongest environmental lever.
- E-waste contains both hazardous materials and recoverable metals, so it must go to a designated recycling program.
- Ontario pathways include university computer science or engineering, college programming and IT, combined transfer routes, and certification.
Computing and Environmental Stewardship
- Energy in kWh = power in watts ÷ 1000 × hours of use; cost = kWh × the rate per kWh (about 0.12 dollars in Ontario, approximately).
- For laptops and phones, manufacturing is usually the largest part of the lifetime footprint, so keeping devices longer is the strongest lever.
- Power-management policies (display off, sleep, overnight shutdown) save the most for the least effort, because most computers are idle most of the time.
- ENERGY STAR certifies energy efficiency; EPEAT rates the whole life cycle in Bronze, Silver and Gold tiers.
- In Ontario, producers are responsible for collecting and recycling electronics; use municipal depots, retailer take-back or producer drop-off programs.
- Deleting or formatting does not erase data: wipe, secure-erase or crypto-erase storage, or destroy it, before disposal.
Emerging Research and Careers in Computing
- Machine learning trains a model on labelled examples and must be tested on data it has never seen; biased or unrepresentative data produces biased results.
- A register of n qubits is described by 2ⁿ numbers, but quantum computers help only with certain problems; post-quantum encryption is being adopted before they arrive.
- Cybersecurity, HCI and bioinformatics each combine computing with another discipline: law and criminology, psychology and design, or biology and medicine.
- Moore's law — transistor counts doubling about every two years — has slowed, pushing progress toward specialized hardware and better algorithms.
- Ontario university computer science programs commonly require ENG4U, MHF4U and MCV4U; college programs typically require Grade 12 English and math.
- A portfolio of two or three finished, documented, published projects is the strongest evidence of interest and skill.
Where marks get lost
- Starting to code during the analysis stage, which locks in a design before the problem is even understood. (The Software Development Life Cycle)
- Writing requirements as wishes — "easy to use", "fast" — that no test can ever confirm. (The Software Development Life Cycle)
- Listing only functional requirements and ignoring speed, reliability and input validation. (The Software Development Life Cycle)
- Treating testing as a final glance rather than a planned stage with written test cases. (The Software Development Life Cycle)
- Assuming the project ends at release, and leaving code and documentation in a state nobody can maintain. (The Software Development Life Cycle)
- Writing pseudocode as Java with the semicolons removed, which defeats the point of a notation the compiler cannot object to. (Problem-Solving, Pseudocode and Algorithm Design)
- Translating FROM 1 TO n as
i < ninstead ofi <= n, losing the final pass. (Problem-Solving, Pseudocode and Algorithm Design) - Ignoring boundary words such as "20 or more", producing a
>where the specification required>=. (Problem-Solving, Pseudocode and Algorithm Design) - Drawing a flowchart decision with only one exit, which becomes a missing case in the finished program. (Problem-Solving, Pseudocode and Algorithm Design)
- Designing the whole program at once instead of decomposing it, so no part can be tested until everything is written. (Problem-Solving, Pseudocode and Algorithm Design)
- Testing only with data the program is expected to handle, so the boundaries and invalid inputs are never exercised. (Testing, Debugging and Documentation)
- Running a test without writing down the expected result first, which makes it impossible for the test to fail. (Testing, Debugging and Documentation)
- Reading the last compiler error instead of the first — later errors are usually knock-on effects of the first one. (Testing, Debugging and Documentation)
- Ignoring the stack trace and guessing at the cause, when it already names the exception, the file and the line. (Testing, Debugging and Documentation)
- Writing comments that restate the code, which add nothing and become false as soon as the line changes. (Testing, Debugging and Documentation)
- Naming variables
a,tortemp2, which forces every reader to reverse-engineer what they hold. (Code Style, Conventions and Maintainable Code) - Leaving the same magic number in several places, then updating only some of them when the value changes. (Code Style, Conventions and Maintainable Code)
- Writing comments that repeat the code, such as
i++; // add 1 to i, instead of explaining why. (Code Style, Conventions and Maintainable Code) - Indenting a statement as if it were inside an if when it is outside the braces, so it misleads the reader and runs every time. (Code Style, Conventions and Maintainable Code)
- Refactoring and changing behaviour in one edit, or committing code that does not compile, so no saved version is safe to return to. (Code Style, Conventions and Maintainable Code)
- Choosing a project by how impressive it sounds rather than by whether its core can be running early. (The Culminating Project, Society and Careers)
- Setting milestones that cannot be proven by running something, so progress can only be guessed at. (The Culminating Project, Society and Careers)
- Leaving no time for testing and documentation, which guarantees both are done badly or not at all. (The Culminating Project, Society and Careers)
- Keeping a single copy of the project on one machine, so one failure or one bad edit erases everything. (The Culminating Project, Society and Careers)
- Assuming a newer device is greener, when manufacturing is the largest part of a device's lifetime energy. (The Culminating Project, Society and Careers)
- Forgetting to divide watts by 1000, which makes an energy figure, and a bill, a thousand times too large. (Computing and Environmental Stewardship)
- Multiplying watts by days instead of by hours, or forgetting to multiply by the number of days at all. (Computing and Environmental Stewardship)
- Assuming a brand-new, more efficient device is automatically greener than keeping a working one, ignoring manufacturing. (Computing and Environmental Stewardship)
- Believing that deleting files or formatting a drive erases the data before a device is donated or recycled. (Computing and Environmental Stewardship)
- Putting electronics in household garbage or recycling bins instead of an e-waste drop-off. (Computing and Environmental Stewardship)
- Assuming a machine-learning model is objective because it is mathematical, when it reproduces whatever bias is in its training data. (Emerging Research and Careers in Computing)
- Treating a quantum computer as simply a faster ordinary computer that will speed up every program. (Emerging Research and Careers in Computing)
- Dropping MHF4U or MCV4U in Grade 12 and discovering that most university computer science programs require them. (Emerging Research and Careers in Computing)
- Building a portfolio of many unfinished projects with no README, tests or explanation of the decisions made. (Emerging Research and Careers in Computing)
- Confusing the research fields: bioinformatics is computing applied to biological data, not the study of computer viruses. (Emerging Research and Careers in Computing)
Practice test
21 questions from across the unit. Each one shows the lesson it comes from.
- The Software Development Life Cycle1Order the stages of the software development life cycle.
- 1Maintenance
- 2Testing
- 3Implementation
- 4Analysis and requirements
- 5Design
- The Software Development Life Cycle2What is the main weakness of the waterfall model?
- The Software Development Life Cycle3A programmer opens the editor and begins typing as soon as a project is described. What is the most likely consequence?
- Problem-Solving, Pseudocode and Algorithm Design4Match each problem-solving strategy to its description.DecompositionPattern recognitionAbstractionWorking backwards
- Problem-Solving, Pseudocode and Algorithm Design5What does it mean that a flowchart decision must have exactly two exits?
- Problem-Solving, Pseudocode and Algorithm Design6A program must calculate a subtotal, apply a discount and then add 13 percent HST. In which order must the steps run?
- Testing, Debugging and Documentation7A method accepts values from 1 to 100 inclusive. Which set of test values is most likely to find a bug?
- Testing, Debugging and Documentation8Which comment is worth writing?
- Testing, Debugging and Documentation9A compiler reports 14 errors. What should you do first?
- Code Style, Conventions and Maintainable Code10Which identifier follows Java conventions for a constant?
- Code Style, Conventions and Maintainable Code11Using CheckoutTotal (discount 10 percent at 35 dollars or more, then 13 percent HST), what total is printed for a cart whose prices add up to 30.00 dollars? Give the answer to 2 decimal places.dollars
- Code Style, Conventions and Maintainable Code12The value 0.13 appears in six places in a program. The rate is stored instead as
static final double HST_RATE = 0.13;. If the rate changes, how many lines must be edited? - The Culminating Project, Society and Careers13Order the milestones of a well-planned culminating project.
- 1Full testing, fixes and documentation
- 2Should-have features added one at a time
- 3All must-have features complete
- 4Requirements, design and a written test plan
- 5A thin slice running end to end
- The Culminating Project, Society and Careers14Name one reason a device should go to a designated e-waste program rather than household garbage.
- The Culminating Project, Society and Careers15What should a project demonstration include, beyond the program working on ordinary data?
- Computing and Environmental Stewardship16A 350 W gaming PC runs 3 hours a day for 365 days. How many kilowatt-hours does it use? Round to 2 decimal places.kWh
- Computing and Environmental Stewardship17A student deletes all their files and empties the recycle bin before donating a laptop. Is the data gone?
- Computing and Environmental Stewardship18Which change usually saves the most energy across a school's computers, for the least cost?
- Emerging Research and Careers in Computing19A face-recognition model works well for some groups and poorly for others. What is the most likely cause?
- Emerging Research and Careers in Computing20What is the name for encryption designed to stay secure even against large quantum computers? (two or three words)
- Emerging Research and Careers in Computing21Which portfolio is strongest for a computing application?
Endless drill
Fresh numbers every time, for the calculation questions in this unit.
Endless drillnew numbers every time
Generating a problem…