import java.lang.*; import java.io.*; import edu.neu.ccs.demeter.dj.*; import java.util.*; import edu.neu.ccs.demeter.*; class Year { protected int year; public int get_year() { return year; } public void set_year(int new_year) { year = new_year; } public Year() { super(); } public Year(int year) { super(); set_year(year); } public static Year parse(java.io.Reader in) throws ParseException { return new Parser(in)._Year(); } public static Year parse(java.io.InputStream in) throws ParseException { return new Parser(in)._Year(); } public static Year parse(String s) { try { return parse(new java.io.StringReader(s)); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } public static Year prompt(String prompt) { /* This function will get a new day from the user input: prompt - a string to prompt the user output: a new Year object */ int returnYearVal = 0; //int value of the year boolean valid = false; //flag tells if a valid year was given while (!valid){ returnYearVal = Main.promptInt(prompt); valid = (returnYearVal > 1800 && returnYearVal < 3000); } Year returnYear = new Year(returnYearVal); return returnYear; } 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_year(this, year); ((UniversalVisitor) _v_).after_year(this, year); 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_year(this, year); ((UniversalVisitor) __v0).after_year(this, year); 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_year(this, year); ((UniversalVisitor) __v0).after_year(this, year); __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_year(this, year); ((UniversalVisitor) __v0).after_year(this, year); __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_year(this, year); ((UniversalVisitor) __v0).after_year(this, year); __trav_viewParty_Party_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_year(this, year); ((UniversalVisitor) __v0).after_year(this, year); __trav_viewPosting_Posting_trv_aft(__v0); } }