Question: I need this done in java please A CalendarDateClass In this project, you will develop and test a CalendarDate class. Here are the responsibilities of

I need this done in java please

A CalendarDateClass

In this project, you will develop and test a CalendarDate class. Here are the responsibilities of the class, that is, the services that the class will provide to users:

1. to initialize a CalendarDate object to represent the date January 1, 2012;

2. Type in a CalendarDate object from integers for the month, day-of-month and year; if the date is invalid (for example, if the month, day-of-month and year are 6, 31 and 2006, respectively), use 1, 1, 2012. Here I need to type in a set of integers for any date, example 1, 30, 2017 This will return January 30, 2017. If the date is invalid like 2, 30, 2017 and exception handeling must retrun a msg of "invlaid date"

3. return, in String form, the next date after this CalendarDate object; for example, if this CalendarDate object represents January 31, 2012, the return value would be February 1, 2012;

4. return, in String form, the date prior to this CalendarDate object; for example, if this CalendarDate object represents January 1, 2013, the return value would be December 31, 2012;

5. return, in String form, the day of the week on which this CalendarDate object falls; for example, if this CalendarDate object represents the date December 20, 2012, the return value would be Thursday;

Part a: Create method specifications for the above responsibilities.

Part b: Develop the CalendarDate class, that is, determine what fields to declare and then define the methods.

Part c: Create a project to test your CalendarDate class. Call each CalendarDate method at least twice.

The ouput sould look like this:

If 1, 31, 2017 this would be the output

January 31, 2017

January 30, 2017

Febuary 1, 2017

Tuesday

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!