Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Extended Date java

brooklyn2fla
brooklyn2fla 


Please refer to the attached documents description. Attachments Tags Clarifications

Answers

Java - Extended Date - Solution

dickersonka
dickersonka 



Attached is the solution to the Java - Extended Date assignment including source with comments and a tester app Attachments
Finalproject.zip (2 K) Download
Preview
// instance variable for value of the date?s day private int year; // instance variable for the value of the dates // Default constructor: set the instance variables to default values: month = 1; day = 1; year = 1900; public Date() { month =

Preview
public void setDate(int monthInt, int dayInt, int yearInt) { if(isValidDate(monthInt, dayInt, yearInt)){ super.setDate(monthInt, dayInt, yearInt); } } // Method to set month ensuring that only valid changes are made public void setMonth(int anInt) { if(anInt >= 1 && anInt <= 12){

Preview
" + dt.toString()); System.out.println(); dt.setMonth(0); System.out.println("Set month 0: " + dt.toString()); dt.setMonth(13); System.out.println("Set month 13: " + dt.toString()); dt.setMonth(6); System.out.println("Set month 6: " + dt.toString()); dt.setMonth(2); System.out.println("Set month 2: " + dt.toString()); System.out.println(); dt.setDay(0); System.out.println("Set day

Screenshots
Purchase Answer