Software configuration lab3

The goal is to write with a reusability and maintainability of the software, the main use of the following software construction techniques:
sub-type, generics, polymorphism, rewrite, heavy
inheritance, agents, combined
common OO design patterns
syntax-driven programming , regular expressions
based on the state of programming
API design, reuse API

Design and implement an abstract data type CircularOrbit, all kinds of reality with things "have a center / center point, around the center of multiple loop / track multiple objects in the center and different distribution loop" feature abstract and use it in specific applications. In the design of the ADT, its generic technology, consider the different types of the center point of the object, different types of objects on each loop, making it more capable of abstraction, ability to adapt to the reality of the needs of different situations stronger.
TrackGame
AtomStructure
SocialNetworkCircle

Different:
trackgame need to be grouped, and even exchange group, the other not,
the objects in orbit AtomStructure no difference
SocialNetworkCircle inclusion relation

The same:
They can be composed of a rail system,
add / delete tracks, a track on the added / deleted objects obtained entropy track system,
and can be visualized MAP

3.1 Input data based on a syntax of
regular expressions read the information in the file, and calls the constructor

3.2 for reuse design: CircularOrbit
design new interface CircularOrbit <L, E>, where L and E represent the center point of the object type and the types of objects in orbit multi-track system.

部分内容如下
void addtrack();
void deletetrack(int i);
void addcenter(L item);
void addobject(int i,E x);
void deleteobject(int i,E x);
void addrelation1();
void addrelation2();
void readfile(File corpus) throws IOException;

Furthermore, the design of a class ConcreteCircularOrbit to implement it.
ConcreteCircularOrbit class implements all the methods CircularOrbit.

Application-oriented classes derived from ConcreteCircularOrbit, namely:
TrackGame
AtomStructure
SocialNetworkCircle

3.3 Design for reuse: Track
recording track number and radius

3.4 Design for reuse: CentralObject
implemented CircularOrbit of L, i.e. the center point CentralObject characterize an object.
L to complete the design and implementation of a specific class based on the experimental requirements
nuclei and human

3.5 Design for reuse: PhysicalObject
implemented ConcreteCircularOrbit <L, E> is E, which represents the object class PhysicalObject distributed on different tracks.
E is completed according to the specific requirements of the experimental design and implementation of the class

Cyborg athletes

3.6 reusable API design
JFrame

3.7 Specific Application Development

  1. Read data files, generating a multi-track structure
  2. Multi-track structure visual display file is read into the program or generated
  3. To provide users with the necessary information in order to add a new track to increase an object on a particular track
  4. The user provides the necessary information to remove the object from a particular track, track delete the entire
  5. Calculation of entropy;
  6. Special features required for each application
  7. Determine the legality of a multi-track system

Experience:
syntax and regular expressions to parse the input file and accordingly construct objects is an important capability
experiment you try to develop API used by others, we encountered many difficulties

Guess you like

Origin blog.csdn.net/weiaibeachsea/article/details/93402500