Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 469 Bytes

boundaries.md

File metadata and controls

17 lines (10 loc) · 469 Bytes

Previous: Error Handling

Boundaries

Using third-party code

  • Providers of third-party packages strive for broad applicability
  • However, users want an interface that focuses on their needs

Bad:

Map sensors = new HashMap();
Sensor s = (Sensor)sensors.get(sensorId);

The get function of Map returns an Object that needs to be cast into a Sensor and the same cast is littered through

Next: Unit Tests