import java.io.PrintWriter; import rebelsky.date.Month; public class Main { public static void main(String[] args) throws Exception { PrintWriter pen = new PrintWriter(System.out, true); for (int i = 1; i <= 12; i++) { Month m = new Month(i); pen.println(m.daysPreceding() + " days precede month " + m.toString()); } // for Month m = new Month(11); pen.println("There are " + m.daysInMonth(11) + " days in month 11."); } // main(String[]) } // class Main // Expected output: // 0 days precede month 1 // 31 days precede month 2 // 59 days precede month 3 // ... // 334 days precede month 12