You are on page 1of 4

Course name: Software engineer 1

Year: Fall 2019


7. Design Note Document

7.1. What is the purpose of using the two interfaces Comparable and Document? Is there another way
of designing the same functionality (a) without using Comparable and (b) without using Document?
Briefly explain why or why not under each case?

 Comparable interface is used to compare objects inside the used collection, and put those
objects in expected order. In this program, it was used to put Customer and HighEarner objects
in alphabetical order.
 Document interface is used to allow the keyword search engine to read the Customer and
HighEarner objects as HTML documents.
 There is still another way of designing the same functionality without using Comparable and
Document. We can use Comparator instead of Comparable to sort the element inside the
collection in expected order. As for Document is an interface created by programmer, can by
implemented by other interface with the same functionality.

7.2. Draw the complete type hierarchy diagram that is used in the software and discuss briefly an
advantage of designing this type hierarchy? (The classes in the diagram must have the necessary
attributes and operations).
Designing this type hierarchy provides the programmer a static view of the software system, showing
the relationship between classes in the system. For that reason, those type hierarchy helps programmer
save the time of coding, increase efficiency.

7.3. What is the purpose of using the SortedSet class in the software? Is it possible to develop the same
software functionality without using this class? Briefly explain why or why not?

 The use of SortedSet is for sorting the object in designed order.


 TreeSet, etc are the collections that provides methods which have similar behavior as in
SortedSet, therefore it is possible to develop the save software functionality wihout using this
class.

7.4. The original KEngine library can only search for text documents using keywords. What makes it
possible to use this component in your software to search for Customer objects using keywords?

Method toHtmlDoc() have the functionality of converting Customer objects to text for KEngine to
search it using keywords.

7.5. Draw a complete UML design class diagram of the software showing the relevant classes (with
attributes and operations) and their dependencies.
7.6

The implementation strategy used to build the software:

- Finish the design specification.

- Programmers need to understand the relationship between classes, and attributes, operations
inside each class. Therefore, before implementing, we need to draw class diagrams.

- Understand the role of every class, interface as well as their relationship in the system

- Determin the structure of program

- Implement code

You might also like