






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Sp02 Final Exam Review: Tools for Space Scientists
The Abstract Factory Pattern could be used in the area of determining whether to gather sensor data from the on or off satelite positions. Since you might not know up front where this information should come from the program could decide that for you based on your needs.
The UML Diagram for this small piece might look like this:
This shows that you would call the section of code responsible for getting the sensor data, then that would determine if it needed to get sensor data from on or off the satelite.
Some good points about Object Oriented programming:
- It allows you to base your design on the objects of the world, thus making it more understandable to non-programmers as well as programmers
- It creates an organizational structure that is easily scalable because the responsabilities of the system are distributed among objects
- It creates code that is more easily maintainable mainly because the structure is more easily understandable
- It makes code that is more likely to be reusable because it creates objects that provide services that can potentially be used in more than one place
- It allows for the use of inheritance so that code is not written more than once
- It allows for encapsulation, the ability to hide the inner workings of objects
- Any number of instances can be made of each object class and objects can be combined to form new objects
Bill Branan
Wouldn't you create a factory class separate from the class of objects that it creates?
Rick Giuly
You could also use the Bridge Pattern. That way you could have different types of modules that you would need to collect the data from different locations. Wrapping it in a uniform wrapper class would enable the different types of modules to be accepted by the main program while maintaining individual functionality.
Stephanie Smiegowski
Link to this Page