Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make sure to have all three classes which are Project1 DateGUI Date212 Thanks Sorting an Array of Dates/ Displaying in a GUI/Creating a Class Given

Make sure to have all three classes which are
Project1
DateGUI
Date212
Thanks image text in transcribed
Sorting an Array of Dates/ Displaying in a GUI/Creating a Class Given an input file of dates represented as Strings, read the dates from the file and display them in a GUI. The dates will be in the form yyyymmdd (such as 20181001 for October 1, 2018). The GUI should have a GridLayout with one row and two columns. The left column should display the dates in the order read from the file, and the right column should display the dates in sorted order (using Selection Sort). Create a class called Date212 to represent a date. It will store the year, month and day as integers (not as a String), so you will need three private instance variables. A constructor should be provided that takes a String (representing the date as above). Use the substring method of class String to pull out the month, day and year, and parse them as integers. Include a private validity checking method that should make sure that the month and day values are legal. If it is not a valid date, print it to the console and do not put it in the array of dates. Create a toString method in class Date 212 the will return the date in the form mm/dd/yyyy. Use this method to display the dates in the GUI Use two arrays containing Date212 objects, one containing valid dates in the order read from the file the other read in and then sorted using Selection Sort. The input file Each line of the input file may contain several dates separated by commas. You will need to use a StringTokenizer to separate out the individual dates. So, an example of the input file would be 20141001 20080912,20131120,19980927 20020202 20120104 Submitting the Project. You should have three files to submit for this project: Projectl.java DateGUI.java Date212.java Upload your project to Blackboard by the due date for full credit

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions

Question

What were some of the team roles at Casper?

Answered: 1 week ago

Question

Describe key customer feedback collection tools.

Answered: 1 week ago

Question

Know what customers expect from the firm when they complain.

Answered: 1 week ago

Question

Understand why customers complain.

Answered: 1 week ago