In the progressive phase of developing a project, instead of designing and then building the completeapplication in one massive leap, prototyping can be used to examine parts of a system.A prototype is a version of the application where one part is simulated in order toexperiment with other parts. For example, one can implement a prototype to test agraphical user interface. In that case, the logic of the application may not be properlyimplemented. Instead, we would write simple implementations for those methods thatsimulate the task. For example, when calling a method to find a free seat in thecinema system, a method could always return seat 3, row 15, instead of actuallyimplementing the search. Prototyping allows us to develop an executable (but notfully functional) system quickly, so that we can investigate parts of the application inpractice.

Prototypes are also useful for single classes to aid a team development process. Often,when different team members work on different classes, not all classes take the sameamount of time to be completed. In some cases a missing class can hold upcontinuation of development and testing of other classes. In those cases it can bebeneficial to write a class prototype. The prototype has implementations of all methodstubs, but instead of containing full, final implementations, the prototype only simulates the functionality. Writing a prototype should be possible quickly, anddevelopment of client classes can then continue using the prototype until the class isimplemented.



Moving towards the documentation of a project or application, afterclassifying the classes and their interfaces, and before starting to implement themethods of a class, the interface should be documented. This includes writing a classcomment and method comments for every class in the project. These should be defined in adequate detail to identify the overall purpose of each class and method.

Along with analysis and design, documentation is a further area that is often neglected by beginners. It is not easy for inexperienced programmers to see whydocumentation is so important. The reason is that inexperienced programmers usuallywork on projects that have only a handful of classes, and that are written in the spanof a few weeks or months. A programmer can get away with bad documentation whenworking on these mini-projects.

However, even experienced programmers often wonder how it is possible to write thedocumentation before the implementation. This is because they fail to appreciate that good documentation focuses on high-level issues, such as what a class or method does, rather than low-level issues, such as exactly how it does it. This is usuallysymptomatic of viewing the implementation as being more important than the design.

Design and Analysis

Class Design:

The preliminary design of a project is considered as one of the most significant parts of the project. You should adopt a strategy for planning tospend at least as much time working on the design as you plan to spend on theimplementation. Design of an application is not something that approaches before theprogramming – it is (the most significantchunk of) programming. Mistakes that arise in the code itself can later be fixed easily. Mistakes in the overalldesign can be, at best, expensive to put right and, at worst, fatal to the wholeapplication. In unlucky cases, they can be almost unfixable (short of starting all overagain).

User interface design:

As it matters with a well-designed application, this is pretty independent of the underlying logic of theapplication, so this can be done independently of designing the class structure for the rest of the project. BlueJ gives us the means of interacting with our application before a final user interface is available, so we can choose towork on the internal structure first.The user interface may be a GUI (graphical user interface) with menus and buttons, itcan be text based, or we can decide to run the application using the BlueJ method callmechanism.