// Design a simple date class Date, then write a main program to demonstrate the usage of this class. Date has different display formats, //, for example, YYYY, MM, DD indicate the year, month, day, we often use the format YYYY.MM.DD, USA commonly used is // mm / dd / yyyy, European common format is DD-MM-YYYY. Usually multiple date objects in the same program use unified // display format. So Format properties should define a static data member ./**Auther starshus ** Date 04/11/20 * /// 5.8.2public class date {private int year = 2000, Month = 1, day = 1; // definition Initialization Variable Private String Greet = "The date is:"; // Description Date String Private STRING FORMAT = "."; // Display Format, Static Variable Public Void SetDate (int Year, int MONTH, INT DAY) / / Set the date {this.year = year; this.month = month; this.day = day;} public void setgreet // set string {this.greet = Greet;} public static void setFormat (String Note) // Set the format, should also be static method {format = Note;} public string getdate () // return date {Return (Greet Year Format Month Format Day);} public static void main (String [] args) // Primary method {Date Date = new date (); // New Object Date.SetDate (2004, 10, 28); System.out.Println (Date.Getdate ()) Date.Format = " / "; // Setting the format Date USADATE = new Date (); usadate.setdate (2004, 11, 13); usadate.setgreet (" this is usa format: "); system.out.println (usadate.getdate) Date.format = "-"; // Setting format Date europedate = new date (); Europedate.SetDate (2004, 11, 13); Europedate.setgreet ("this is europedate:"); system.out.println Europedate.getdate ());}}