java program
Q1. [5 pts] Write class Citizen which has Five instance variables: - name: String - civillD: String - dateOfBirth: Date - expirationDate: Date - currentDate: Date This is static/final and set to today's date. Class Date is provided for you, so you do not need to implement it. Your Citizen class should have: - A constructor that initializes the name, civillD, dateOfBirth, expirationDate. - A second constructor that takes 0 arguments and initializes name and civillD to " N/A"; and initializes the dateOfBirth (day, month, and year) (of class Date) to 1,1,2000, respectively, and finally the expirationDate to 1,1,3000. - A third constructor that takes only name and civillD, initializes the dateOfBirth day, month, and year to 1,1,2000, and initializes expirationDate to 1,1, 3000 respectively. - set and get methods for all your instance variables with valid values. The class also should include methods that: 1. checkExpiration: check the object's expiration has occurred (need to check current date for this) and print a statement that alerts the user. Write another class called Citizentest that includes the main method. Your main should do the following: - Print the Current Date at the top of the console. - Create an array of type Citizen with a size of 5. - Create each object of the array manually and initialize it as follows: Array element 0 : When you create the object, pass to the constructor 0 parameters Array element 1: pass to the constructor only: "Ahmed" "299060700244" Array element 2: pass to the constructor: "Sara", 298060300744" 6,3,1998,6,3,2026 Array element 3: pass to the constructor: "Noura", "290170500284", 17,5,1990, 18,5,2030 Array element 4: pass to the constructor: "Ali", "295200100994",20,1,1995, 21,1,2020 - Finally, use a for loop to go through each element of the array and print the name and date of birth (use the method formattedDate from the class Date to get the date of birth in a formatted string). int: use "import java.time.LocalDateTime;" and the variable of the class called ocalDateTime" assigned to "LocalDateTime.now()" with methods .getDayOfMonth(), ..getMonthValue(), ..getYear()" to get the ay/month/year format for today's date. our output should look exactly as shown below: dit Format View Help rt java.time. LocalDateTime; ic class Date \{ private int day; private int month; private int year; / ========= Constructor ================ public Date (int day, int month, int year) \{ if ( day 31) \{ System.out.println("Error: Day out of range") this. day =1; \} else this. day = day; if ( month 12) \{ System.out.println("Error: Month out of range" this. month =1; \} else this. month = month; if (year =2000; 3 else this year = year; \}//end of constructor public string formattedDate() \{ return String. format("\%02d/\%02d/\%d", getDay(), getMonth(), getYear () \}//end of formated Date lend of class