CMSC 433 Midterm Review: Java, Projects, Testing, Abstraction, and Design Patterns, Study notes of Programming Languages

A midterm review for the cmsc 433 - programming language technologies and paradigms course held in spring 2003. The review covers java basics, projects, testing and specifications, abstraction, types, polymorphism, and design patterns. Topics include objects, inheritance, interfaces, exceptions, testing methodologies, junit, abstraction function, rep invariant, subtypes, overloading methods, polymorphism, design patterns, and more.

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-bgn
koofers-user-bgn 🇺🇸

8 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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
pf2

Partial preview of the text

Download CMSC 433 Midterm Review: Java, Projects, Testing, Abstraction, and Design Patterns and more Study notes Programming Languages in PDF only on Docsity!

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

7

Abstraction, Types, Polymorphism

  • Data abstraction
    • Abstraction function, rep invariant
  • Subtypes and overloading methods
  • Polymorphism
    • Subtype polymorphism
    • Parametric polymorphism with GJ 8

Design Patterns

  • Object Modeling Technique
  • Iterators
  • Singleton, typesafe enum
  • Abstract Factory
  • Adapter
  • Proxy
  • Decorator
  • Template
    • State
    • Observer
    • Composite
    • Strategy
    • Bridge
    • Command
    • Visitor 9

Project 3

  • GoogleMap (and LazyList)
    • Generic Java
    • GJ Container classes
    • Iterators and laziness
    • Abstraction