The class IntCompSeq. | Lecture 8 - slide 36 : 37 Program 5 |
public class IntCompSeq: IntSequence{ private IntSequence s1, s2; // Binary sequence: Exactly two subsequences. public IntCompSeq(IntSequence s1, IntSequence s2) { this.s1 = s1; this.s2 = s2; } public IntSequence First{ get{return s1;} } public IntSequence Second{ get{return s2;} } public override int Accept(Visitor v){ return v.Visit(this); } } |