Skip to main content

Description

Three CSSE2002 topics cost more marks than the rest. They're declared vs actual type (with overloading), substitution and coverage tables. This booklet takes each one slowly. It starts each topic with the mental model. Then come worked examples and the traps, and after that a step-by-step method for writing the answer in the exam. And each one ends with practice questions. The answers are at the back, so you can test yourself first. Plus there are diagrams. The first shows the two-step rule for which method runs. The second shows what weaker and stronger conditions mean, and the third is a control flow graph for a coverage question. And every code example was compiled and run on Java 21, so the outputs shown are real. Every line marked as a compile error was checked against the compiler as well. If you want a 7, you need 75% in the final exam. So these three topics, which turn up again and again, are the ones worth fixing first. Written by a UQ mechatronics graduate who took CSSE2002 and tutored first-year engineering at UQ. My MECH3200 revision notes have sold on StudentVIP since 2018. Topics covered: 1. Declared type vs actual type 2. The two-step rule: compile time picks the signature, run time picks the body 3. Overloading vs overriding 4. How Java chooses between overloads 5. Hiding: private and static members, fields 6. The substitution principle: when a weaker or stronger condition is allowed 7. Invariants and "never changes" promises, with a hash set example that breaks 8. What the compiler checks: exceptions and return types 9. Judging two specs on paper 10. Black box testing: partitions and boundaries, worked on one method 11. Statement vs branch vs condition coverage 12. Finding a minimal test set 13. Short-circuiting and loops, and how they change what counts as covered 14. Practice questions with answers


UQ

Semester 1, 2024


19 pages

6,071 words

$29.00

Add to cart