core: import java.lang.*; import java.io.*; import edu.neu.ccs.demeter.dj.*; import java.util.*; import edu.neu.ccs.demeter.*; add: class Day { protected int day; public int get_day() {{ return day; }} public void set_day(int new_day) {{ day = new_day; }} public constructor Day() {{ super(); }} public constructor Day(int day) {{ super(); set_day(day); }} public static Day parse(java.io.Reader in) throws ParseException {{ return new Parser(in)._Day(); }} public static Day parse(java.io.InputStream in) throws ParseException {{ return new Parser(in)._Day(); }} public static Day parse(String s) {{ try { return parse(new java.io.StringReader(s)); } catch (ParseException e) { throw new RuntimeException(e.toString()); } }} public static Day prompt(String prompt) {{ /* This function will get a new day from the user input: prompt - a string to prompt the user output: a new Day object */ int dayVal = 0; //int value of the day boolean valid = false; //flag tells if the day is valid while (!valid){ dayVal = Main.promptInt(prompt); valid = (dayVal > 0 && dayVal < 32); } Day returnDay = new Day(dayVal); return returnDay; }} {{ 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_day(this, day); ((UniversalVisitor) _v_).after_day(this, day); 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_day(this, day); ((UniversalVisitor) __v0).after_day(this, day); 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_day(this, day); ((UniversalVisitor) __v0).after_day(this, day); __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_day(this, day); ((UniversalVisitor) __v0).after_day(this, day); __trav_display_Bank_trv_aft(__v0); } }} {{ void __trav_viewParty_Party_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } }} {{ void __trav_viewParty_Party_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } }} {{ void __trav_viewParty_Party_trv(PrintVisitor __v0) { __trav_viewParty_Party_trv_bef(__v0); ((PrintVisitor) __v0).before_day(this, day); ((UniversalVisitor) __v0).after_day(this, day); __trav_viewParty_Party_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_day(this, day); ((UniversalVisitor) __v0).after_day(this, day); __trav_viewAccount_Account_trv_aft(__v0); } }} {{ void __trav_viewPosting_Posting_trv_bef(PrintVisitor __v0) { ((UniversalVisitor) __v0).before(this); } }} {{ void __trav_viewPosting_Posting_trv_aft(PrintVisitor __v0) { ((UniversalVisitor) __v0).after(this); } }} {{ void __trav_viewPosting_Posting_trv(PrintVisitor __v0) { __trav_viewPosting_Posting_trv_bef(__v0); ((PrintVisitor) __v0).before_day(this, day); ((UniversalVisitor) __v0).after_day(this, day); __trav_viewPosting_Posting_trv_aft(__v0); } }} }