THE PROBLEM:
It makes it easier if you use switch statements for some part of the homework. Write a program that inputs a month, day, and year from the user and outputs the corresponding date in the following two standard date formats:
6/12/2005 June 12,2005
Also your program must print the name of any holiday associated with the date.
For example:
3/17/2010 March 17, 2010 St. Patrick's Day
Your program should ask the user how many times the user wants to run the code and then you need to use a for loop to repeat the run that many times.
REQUIREMENTS:
- You must use good programming style.
- The user can enter the month either as a numeric value or a String. i.e. the user could enter a 5 or May.
- You may assume the data that the user enters is valid data.
- Your program must print a report similar to that shown in the sample output on the last page of this handout.
- Provide block comments including your name, date and a description of the program
- Provide comments throughout your code.
- You must create two different classes. DateInput.java and DateInputDriver.java
- You must solve this problem by implementing and using the following methods in the class DateInput.java:


use java please
public void data function(){
void printDirections(){
System.out printIn("This program will take input a month ,day and
year and output date in following formats : 6/12/2005 ,June 12,2005
and also will print holidays");
}
String getMonth String(int month){
switch(month){
case 1:
return "Jan";break;
case 2:
return "Feb";break;
case 3:
return "March";break;
case 4:
return "April";break;
case 5:
return "May";break;
case 6:
return "June";break;
case 7:
return "July";break;
case 8:
return "August";break;
case 9:
return "September";break;
case 10:
return "October";break;
case 11:
return "November";break;
case 12:
return "December";break;
Default:
return "INVALID";}}
int getMonthNumber(string month){
switch(month)
case="Jan":
return 1 ; break;
case="Feb":
return 2 ;break;
case ="March":
return 3;break;
case= "April":
return 4; break;
case ="May":
return 5; break;
case="June":
return 6; break;
case="July":
return 7;break;
case="August":
return 8;break;
case="September":
return 9;break;
case="October":
return 10; break;
case="Novermber":
return 11;break;
case="December":
return 12;break;
Default :
return 0;
}}
String getHoliday(int mon,int day){
switch (mon)
{
case 5:
{
switch (day)
case 2:
return "Its my birthday";
}
switch (mon)
{
case 2:
switch (day)
case 12:
return "Abraham Lincoln Birthday";
}
switch (mon)
{
case 1:
switch (day)
case 1:
return "Martin Luther King Birthday";
}
switch (mon)
{
case 12:
switch (day)
case 1:
return "New Year";
}
switch (mon)
{
case 4:
switch (day)
case 1:
return "Ground Hog day";
}
Default :
return " ";
}
boolean isEaster(int mo,int day,int year){
int easterDay,easterMonth,goldennumber,a,b,c,d;
goldennumber=(year%19)+1;
a=(24+19*(goldennumber-1))%30;
b=a-a/28;
c=(year+year/4+b-13)%7;
d=b-c;
easterMonth=3+(d+40)/44;
easterDay=d+28-31*(easterMonth/4);
}
}
class Main {
public static void main(String[] args) {
System.out.println("How many times program should run");
int loop=0;
scanner obj =new scanner(system.in);
loop=obj.nextInt();
for(int i=0;i
datafunction();
}
}
}

COMMENT DOWN FOR ANY QUERIES AND,
LEAVE A THUMBS UP IF THIS ANSWER HELPS YOU.
Write a program that inputs a month, day, and year from the user and outputs the corresponding date in the following two standard date formats:
Write a program that prompts the user to enter a person's birth date in numeric form (e.g. 8-27-1980) and outputs the date of birth in the format of month day, year (e.g. August 27, 1980). Your program must work for three types of exceptions - invalid day, invalid month and invalid year (year must be between 1915 and 2015). Make these as class driven exceptions. Use one try-catch block with separate catches for the exception classes to handle errors for...
IN PYTHON, Write a program that reads a string from the user containing a date in the form mm/dd/ yyyy. It should print the date in the form April 12, 2017. Hint: Get the "mm" from the user entered date "mm/dd/yyyy", then convert the "mm" into a month number. You may use an list month_list = ['January', 'February','March','April', 'May','June', 'July','August', 'September', 'October', 'November', 'December']. Use the month number you got from "mm" to get the month name.
Write a small program that asks the user how many asterisks it should print out. The user responds with a number, then the program prints that number of asterisks. The number of asterisks to print should be stored in a variable. Finally the program asks the user if it should start over, and repeats as many times as the user wants. The prompt to run the program again should look like the one below, and should wait at the end...
use python Write a program that asks the user for day and month of a birthday. The program then tells the Zodiac signs that will be compatible with that birthday. #Example for Aries The Ram Mar. 21–Apr. 19 day = 24 # user enters this month = 3 # user enters this if ( month == 3 and day >=21) or (month == 4 and day <= 19): print("You are Aries, Fire group, compatible with Aries, Leo, Sagittarius") Zodiac Signs:...
CODING IN JAVA Dates are printed in several common formats. Two of the more common formats are: 07/21/55 and July 21, 1955 Write a program that reads a date in the first format and prints that date in the second format. Prompt the user and accept user input for the date in MM/DD/YYYY format. Retrieve the month portion of the date entered and convert it to an integer. Do the same thing for day and year Create a string named...
Write a program that prompts the user for an integer that the player (maybe the user, maybe someone else) will try to guess. If the player's guess is higher than the target number, the program should display "too high" If the user's guess is lower than the target number, the program should display "too low" The program should use a loop that repeats until the user correctly guesses the number. Then the program should print how many guesses it took....
# C PROGRAMMING LANGUAGEWrite a program that accepts a date from the user in the form mm/dd/yyyy and then dis- plays it in the form month dd, yyyy, where month is the name of the month: Enter a date (mm/dd/yyyy): 2/17/2011 You entered the date February 17, 2011 Store the month names in an array that contains pointers to strings.
Write a program named CheckMonth2 that prompts a user to enter a birth month and day. Display an error message that says Invalid date if the month is invalid (not 1 through 12) or the day is invalid for the month (for example, not between 1 and 31 for January or between 1 and 29 for February). If the month and day are valid, display them with a message. For example, if the month entered is 2, and the day...
Part I Create a Java program that inputs a grade from the user. The grade input from the user will be an integer. Once the input is stored, use an if-else-if block of code to determine the letter grade of the inputted integer grade. Do not use a bunch of if statements by themselves to solve this problem. You will print an error message for inputs greater than 100 and for inputs less than 0. Both errors must be handled...