
1
CMSC 433 – Programming Language
Technologies and Paradigms
Spring 2003
Midterm Review
March 18, 2003
2
Midterm Thursday
•Samples from previous semesters on web page
–May have covered slightly different material
•Covers everything through today
–Including projects 1, 2, and 3
•Be in class on time
–Or you will have less time to do the test!
3
Java Basics
•Objects, inheritance, and interfaces
–Mutability, equality, casts (dynamic types)
•Method dispatch
–Overriding, overloading
–Dynamic, static
•Exceptions
–try, catch, finally
4
Project 1
•Build a toy Java web server
–MiniServlet interface between web server and servlets
–A little bit of reflection
–Some generic container classes (e.g., Map)
–Some sockets and I/O
•If you need any java.* APIs, we’ll give them to you on the exam
5
Testing and Specifications
•Benefits and limitations of testing
•Black box vs. white/glass box
–Tips on generating tests from specs
–Statement, branch, condition coverage
–Tradeoffs, design choices (e.g., unit vs. integration)
•Specifications
–Issues (tradeoffs between formal and informal etc.)
–What makes a good specification
–Javadoc
•You won’t need to write any, but you should understand it
6
Project 2
•Use JUnit to test Graphs
–JUnit philosophy: full automated, test-as-you-go
–Test case components: set up, run, tear down
–Test suites, test runner
–Testing against a specification