Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming language Java For this programming assignment you will be re-using portions of your code from the last assignment as a starting point. You are

programming language Java

For this programming assignment you will be re-using portions of your code from the last assignment as a starting point. You are to create a new DateFileTest class that uses the existing Date Class for the following:

  • Instead of bringing in dates from a user, you will be bringing in dates from a text file.
  • You should use the existing Date class to create date objects from file inputs
  • The data in the file is provided in alternating formats in order from MM/DD/YYYY to Month name, DD, YYYY (just those two formats to simplify the input handling and verification). Spaces are used in the file as delimiters between integers and strings in the date format. You will use the file provided here

DAtes in multiple formats.

8 17 1943 April 1 1985 4 27 2010 September 27 2005 12 13 2001 June 5 1075 11 25 1974 December 11 2004 21 14 1980

    • Your code is to handle exceptions for the following situations;
    • the file is not found or can't be opened, in which case the program informs the user and ends.
    • the month is not a valid month (between 1-12), using a try/catch block
    • the year is not a valid year (assume between 1800-2020 is valid, using a try/catch block)
    • the entry is not a valid month name (must start with a capital and be spelled correctly as a string)
    • If any of these exceptions occur, your program must disregard that specific date, output an error message to the display, NOT write that specific date to the file, and continue to move on to process the rest of the data in the file
    • Your program will create a new text file and write dates out to that file. You will write out all 3 formats (with appropriate / and , delimiters) to the file for each date read in from the file.
    • Your program files must include a program header that includes your name, course discussion section, and program description. Well structured and commented code are expected. Your submission must include all program files, output text file, and execution screenshots showing your messages from error handling. Submissions without all the files will not receive a grade and no late submissions will be accepted.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago