import java.lang.*; import java.io.*; import edu.neu.ccs.demeter.dj.*; import java.util.*; import edu.neu.ccs.demeter.*; class Index { protected int index; public int get_index() { return index; } public void set_index(int new_index) { index = new_index; } public Index() { super(); } public Index(int index) { super(); set_index(index); } public static Index parse(java.io.Reader in) throws ParseException { return new Parser(in)._Index(); } public static Index parse(java.io.InputStream in) throws ParseException { return new Parser(in)._Index(); } public static Index parse(String s) { try { return parse(new java.io.StringReader(s)); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void print() { PrintVisitor v0 = new PrintVisitor(); v0.start(); __trav_print(v0); v0.finish(); } public static Index prompt(String prompt) { /* This function will create an Index described by the user input: prompt - a prompt to show the user output: a new Index object with value given by the user */ int indexVal = Main.promptInt(prompt); Index returnIndex = new Index(indexVal); return returnIndex; } void universal_trv0_bef(UniversalVisitor _v_) { ((UniversalVisitor) _v_).before(this); } void universal_trv0_aft(UniversalVisitor _v_) { ((UniversalVisitor) _v_).after(this); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); ((UniversalVisitor) _v_).before_index(this, index); ((UniversalVisitor) _v_).after_index(this, index); universal_trv0_aft(_v_); } void everything_Bank_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void everything_Bank_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void everything_Bank_trv(PrintVisitor __v0) { everything_Bank_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); everything_Bank_trv_aft(__v0); } void __trav_print_Bank_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void __trav_print_Bank_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void __trav_print_Bank_trv(PrintVisitor __v0) { __trav_print_Bank_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_print_Bank_trv_aft(__v0); } void __trav_display_Bank_trv_bef(DisplayVisitor __v0) { ((DisplayVisitor) __v0).before(this); } void __trav_display_Bank_trv_aft(DisplayVisitor __v0) { ((DisplayVisitor) __v0).after(this); } void __trav_display_Bank_trv(DisplayVisitor __v0) { __trav_display_Bank_trv_bef(__v0); ((DisplayVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_display_Bank_trv_aft(__v0); } void __trav_viewUnit_BusinessUnit_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void __trav_viewUnit_BusinessUnit_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void __trav_viewUnit_BusinessUnit_trv(PrintVisitor __v0) { __trav_viewUnit_BusinessUnit_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_viewUnit_BusinessUnit_trv_aft(__v0); } void __trav_viewContract_Contract_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void __trav_viewContract_Contract_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void __trav_viewContract_Contract_trv(PrintVisitor __v0) { __trav_viewContract_Contract_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_viewContract_Contract_trv_aft(__v0); } void __trav_viewPortfolio_Portfolio_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void __trav_viewPortfolio_Portfolio_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void __trav_viewPortfolio_Portfolio_trv(PrintVisitor __v0) { __trav_viewPortfolio_Portfolio_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_viewPortfolio_Portfolio_trv_aft(__v0); } void __trav_viewAccount_Account_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void __trav_viewAccount_Account_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void __trav_viewAccount_Account_trv(PrintVisitor __v0) { __trav_viewAccount_Account_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_viewAccount_Account_trv_aft(__v0); } public void __trav_print(PrintVisitor __v0) { __trav_print_Index_trv(__v0); } void __trav_print_Index_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } void __trav_print_Index_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } void __trav_print_Index_trv(PrintVisitor __v0) { __trav_print_Index_trv_bef(__v0); ((PrintVisitor) __v0).before_index(this, index); ((UniversalVisitor) __v0).after_index(this, index); __trav_print_Index_trv_aft(__v0); } }