Question: Date Class CS 1110 Assignment 2 1. Date Class Name: Date.java Create a Date class with the following items: Attributes: . Year . Month Day

Date Class

Date Class CS 1110 Assignment 2 1. Date Class Name: Date.java Create

CS 1110 Assignment 2 1. Date Class Name: Date.java Create a Date class with the following items: Attributes: . Year . Month Day Constructors: . No argument constructor (set the attributes to default values) Constructor that allows the year, month, and day to be specified Operations: toString0 to return a string representation of the Date in the format year-month-day (e.g., 2018-2-1) Add a main0 method to the Date class that creates two Date objects, one using the no arg constructor and one using the other constructor. Display the result of both Date object's toString) methods. Example Output: datel: 2000-1-1 date2: 2018-2-1

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!