CSE Roadmap

Core tier · about 3 hours · 6 parts

Part 1 of 6 · 1 min read

Why this page comes first in Level 5

In this module you will

  • Check method inputs at the door and choose the right standard exception.
  • Choose between a checked and an unchecked exception.
  • Translate a low-level exception into one that fits the layer, keeping the cause.
  • Write a method that leaves an object unchanged when it fails.
  • Return an empty result without using null.

The patterns of Levels 3 and 4 assume that code works. A real design also says what happens when it does not. Interviewers ask "what if the room is already taken" or "what if payment fails" in nearly every case study. This page gives a small set of rules for answering. The sources are "Effective Java" (EJ) Items 49 and 69 to 77, and "Clean Code" (CC) chapter 7. Code was compiled and run before it was written here. Numbers marked "made up" only show the idea.