Ever wished you were just a bit more flexible? When you run into problems making changes to your application, it probably means that your software needs to be more flexible and resilient. To help stretch your application out, you’re going to do some analysis, a whole lot of design, and learn how OO principles can really loosen up your application. And for the grand finale, you’ll see how higher cohesion can really help your coupling. Sound interesting? Turn the page, and let’s get back to fixing that inflexible application.
Loaded up with some new OO principles, we’re ready to tackle making Rick’s application well-designed and flexible. Here’s where we left off, and some of the problems we’ve discovered:
Frank: Yeah, it’s a pain, but I don’t see any way to get around it. We have to let Rick’s clients search for each different type of instrument somehow.
Jim: I still don’t see why we can’t have just one search() method that takes in an InstrumentSpec. Wouldn’t that cut down ...