Database Reference
In-Depth Information
//Program to demonstrate a very simple example of a class
called DayOfYear.
#include <iostream.h>
//This is where we define our class. We'll call it DayOfYear
//It is a public class. This means that there are no
restrictions
//on use. There are also private classes.
//The class DayOfYear consists of two pieces of data: month
and day and
//one function named output ()
class DayOfYear
{
public:
void output();
int month;
int day;
};
Designing OO systems requires the use of different modeling and defi-
nitional techniques that take into account the idea of classes and objects.
UML is the standard for modeling OO software. Figure 7.7 showed a sam-
ple class diagrammed using UML. Contained within a typical SDS are
numerous diagrams (models):
• Class diagrams
• Object models
• Package diagrams, which show how the classes are grouped together
• Collaboration diagrams, which show how the classes collaborate or
work with each other
Testing
When you tie many programs together, you have a system. It is not uncom-
mon for a system to have thousands of lines of code. All of this code must
be tested. The very first level of testing is at the programmer's desk. This
is where the programmer works with whatever tools are available to make
sure that everything works.
When a group of programmers work together, their project manager
might think it a good idea that a walk-through be held. This is when the
team gets together and examines the code as a group to find flaws and
discuss better ways to do things. Usually this isn't done. One reason is
Search WWH ::




Custom Search