Inheriting code

This chapter is a case study of legacy code that needs (what should be) a minor change. We will quickly find out that the change is not so minor. To begin, let's look at what the legacy application does.

Here is some sample output from a run of this code:

Take a guess: AAAA
---+
Take a guess: BBBA
-+-+
Take a guess: CBCA
++
Take a guess: DBDA
++-+
Take a guess: DBEA
++++
Congratulations you guessed the password in 5 tries.
Press any key to quit.

Looking at the interactions, this program doesn't look that bad. In speaking with the business analyst, the application was explained as a game.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.183.234