Create a class IndependenceUSA and write code which asks the user to enter text that contains the American Independence day ( July 4th 1776). Read the date using the method next() 3 times. The user should enter the Independence day in the order month, day, year as shown in the first two runs below( we are not case sensitive) . Use the String method compareToIgnoreCase() to test the validi- ty of the date and print “Hurrah!” if the date entered is correct, or “No, no , no! Incorrect!” if the date incorrect is incorrect, or of the date entered in the wrong order. In other words, you compare your input to “July” , “4”, “1776” , in that order and you don't case for capital or small case letters.
Create a class IndependenceUSA and write code which asks the user to enter text that contains the
American Independence day ( July 4th 1776). Read the date using the method next() 3 times. The
user should enter the Independence day in the order month, day, year as shown in the first two runs
below( we are not case sensitive) . Use the String method compareToIgnoreCase() to test the validi-
ty of the date and print “Hurrah!” if the date entered is correct, or “No, no , no! Incorrect!” if the
date incorrect is incorrect, or of the date entered in the wrong order. In other words, you compare
your input to “July” , “4”, “1776” , in that order and you don't case for capital or small case letters.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)