Interaction020.java

Package: coupling/interaction/
File: Interaction020.java

  1. package coupling.interaction;
  2.  
  3. /**
  4.  * An Interaction020 is an Interaction010 with a valence.
  5.  */
  6. public class Interaction020 extends Interaction010{
  7.  
  8. private int valence;
  9.  
  10. public Interaction020(String label){
  11. super(label);
  12. }
  13.  
  14. public void setValence(int valence){
  15. this.valence = valence;
  16. }
  17.  
  18. public int getValence(){
  19. return this.valence;
  20. }
  21.  
  22. @Override
  23. public String toString(){
  24. return this.getLabel() + "," + this.getValence();
  25. }
  26.  
  27. }
  28.  

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