Experiment050.java

Package: coupling/
File: Experiment050.java

  1. package coupling;
  2.  
  3. import java.util.List;
  4. import java.util.ArrayList;
  5. import coupling.interaction.Interaction;
  6.  
  7. /**
  8.  * An Experiment050 is an Experiment040 that has a list of enactedInteractions.
  9.  * Enacted Interactions are interactions that may end up being enacted
  10.  * instead of the intended interaction when performing this experiment.
  11.  */
  12. public class Experiment050 extends Experiment040 {
  13.  
  14. private List<Interaction> enactedInteractions = new ArrayList<Interaction>();
  15.  
  16. public Experiment050(String label){
  17. super(label);
  18. }
  19.  
  20. public void addEnactedInteraction(Interaction enactedInteraction){
  21. if (!this.enactedInteractions.contains(enactedInteraction))
  22. this.enactedInteractions.add(enactedInteraction);
  23. }
  24.  
  25. public List<Interaction> getEnactedInteractions(){
  26. return this.enactedInteractions;
  27. }
  28. }
  29.  

See public discussions about this page or start a new discussion by clicking on the Google+ Share button. Please type the #IDEALMOOCExperiment050 hashtag in your post: