Java Reference
In-Depth Information
For this to work, each team member must write documentation about his class similar to the
documentation for the Java standard library, which enables other people to use the class without
the need to read the code. This topic will also be discussed in this chapter.
5.2
The TechSupport system
As always, we shall explore these issues with an example. This time, we shall use the
TechSupport application. You can find it in the topic projects under the name tech-support1.
TechSupport is a program intended to provide technical support for customers of the fictitious
DodgySoft software company. Some time ago, DodgySoft had a technical support department
with people sitting at telephones. Customers could call to get advice and help with their techni-
cal problems with the DodgySoft software products. Recently, though, business has not been
going so well, and DodgySoft decided to get rid of the technical support department to save
money. They now want to develop the TechSupport system to give the impression that support
is still provided. The system is supposed to mimic the responses a technical-support person
might give. Customers can communicate with the technical-support system online.
5.2.1
Exploring the TechSupport system
Exercise 5.1 Open and run the project tech-support-complete . You run it by creating an
object of class SupportSystem and calling its start method. Enter some problems you
might be having with your software, to try out the system. See how it behaves. Type “bye”
when you are done. You do not need to examine the source code at this stage. This project is
the complete solution that we will have developed by the end of this chapter. The purpose of
this exercise is only to give you an idea of what we plan to achieve.
Eliza The idea of the TechSupport project is based on the groundbreaking artificial intelligence pro-
gram, Eliza, developed by Joseph Weizenbaum at Massachusetts Institute of Technology in the 1960s.
You can find out more about the original program by searching the web for “Eliza” and “Weizenbaum.”
We will now start our more detailed exploration by using the tech-support1 project. It is a first,
rudimentary implementation of our system. We will improve it throughout the chapter. This
way, we should arrive at a better understanding of the whole system than we would by just
reading the complete solution.
In Exercise 5.1 you have seen that the program essentially holds a dialog with the user. The user
can type in a question, and the system responds. Try the same with our prototype version of the
project, tech-support1 .
In TechSupport 's complete version, the system manages to produce reasonably varied responses—
sometimes they even seem to make sense! In the prototype version we are using as a starting point,
the responses are much more restricted (Figure 5.1). You will notice very quickly that the response
is always the same:
“That sounds interesting. Tell me more...”
 
Search WWH ::




Custom Search