SWE_Projekt

Requirements / Prerequisites

Run Application

Then you should see a GUI like this.

Description of the modules are shown by hovering over the combobox.

Task

Class Description
AGGREGATE_Ger_Satellite Aggregates all Satellites that have german channels implements IAggregate.
AGGREGATE_Radio_Channels Aggregates all Satellites with radio channels implements IAggregate.
AGGREGATE_Satellite_Channels_HD Aggregates all Satellites with HD channels implements IAggregate.
AGGREGATE_Satellite_Eng_Channel Aggregates all Satellites with english channels implements IAggregate.
AGGREGATE_Satellite_Ger_Channel Aggregates all Satellites with german channels implements IAggregate.
AGGREGATE_Satellite_Transponder_Count_Channels Aggregates all Satellites with their respective count of radio and TV channels implements IAggregate.
Class Description
JSONFileWriter JSONFileWriter class implements IOutput.
SimpleFileWriter SimpleFileWriter class implements IOutput.
TextBoxWriter TextBoxWriter class inherits JFrame implements IOutput.

Software-Design

Interface Aggregation-Modules

IAggregate Interface

public interface IAggregate extends IDescriptor {

 /**
  * Creates composite structure to store the aggregate.
  * 
  * @param satellitesList list of all Satellite objects
  * @return CompositeContainer Root composite container
  */
 public CompositeContainer aggregate(ArrayList<Satellite> satellitesList);
}

This interface needs to be implemented in any further aggregation-module, written by any developer. The Input of any aggregation is a list, containing all satellite data, including their transponders and channels. Any aggregation-module must return a compositum-instance (can be hierarchically indefinitely deep) containing the results of the particular aggregation.


Interface Output-Modules

IOutput Interface

public interface IOutput extends IDescriptor {

 /**
  * Outputs the contents of the composite structure
  * 
  * @param container Root composite container
  */
 public void output(CompositeContainer container);

 /**
  * Resets the Output module object to its initial state.
  * 
  */
 public void reset();
}

This interface needs to be implemented in any further output-module, written by any developer. Input of any output is a head-container of a compositum-structure, containing all aggregated key-value-data. Furthermore, the method void reset() needs to be implemented to make sure, the state of any output module can be set to its initial state afterwards.

Implemented design-patterns, Design-Principles


How to write an additional aggregation/output module

  1. Create a project for your module and include SWT.jar as external dependency.

  2. Create a class within the default package implementing IAggregate or IOutput as interface.
  3. Export the module as jar-file, where the name of your jar file e.g. MyModule.jar must match the class (e.g. MyModule.java) implementing the interface

Template for writing an aggregation-module

import java.util.ArrayList;

import model.Satellite;
import model.aggregations.IAggregate;
import model.container.CompositeContainer;

public class AGGREGATE_Template_Module implements IAggregate {

  private static final String NAME = "Decent Name of Class";
  private static final String DESCRIPTION = "<HTML><pre width=220px>"
      + "- Description: A\n"
      + "	- of: i\n"
      + "	- implemented: ii\n"
      + "	- Module: iii\n"
      + "</pre></HTML>";

  @Override
  public String getName() {
    return NAME;
  }

  @Override
  public String getDescription() {
    return DESCRIPTION;
  }

  @Override
  public CompositeContainer aggregate(ArrayList<Satellite> satellites) {
    // TODO Auto-generated method stub
    return null;
  }

}

Template for writing an output-module

import model.container.CompositeContainer;
import view.output.IOutput;

public class OUTPUT_Template_Module implements IOutput {

  private static final String NAME = "Decent Name of Class";
  private static final String DESCRIPTION = "<HTML><pre width=300px>Description of implemented module.</pre></HTML>";

  @Override
  public String getDescription() {
    return DESCRIPTION;
  }

  @Override
  public String getName() {
    return NAME;
  }

  @Override
  public void output(CompositeContainer root) {
    // TODO Auto-generated method stub

  }

  @Override
  public void reset() {
    // TODO Auto-generated method stub
  }

}

Appenxix

UML-Class-Diagram

UML_Classes

Code-Coverage

Javadoc

References