October 1999
Beginner to intermediate
352 pages
7h 49m
English
Exercise 1: from Orthogonality on page 43
You are writing a class called Split, which splits input lines into fields. Which of the following two Java class signatures is the more orthogonal design?

Answer 1: To our way of thinking, class Split2 is more orthogonal. It concentrates on its own task, splitting lines, and ignores details such as where the lines are coming from. Not only does this make the code easier to develop, but it also makes it more flexible. Split2 can split lines read from a file, generated by another routine, or passed in via the environment.
Exercise 2: from Orthogonality on page 43
Which will ...
Read now
Unlock full access