Question: Create a class called Date that includes 3 instance variablesa month (type int), a day (type int), and a year (type int). Provide a constructor

Create a class called Date that includes 3 instance variables—a month (type int), a day (type int), and a year (type int). Provide a constructor that initializes the 3 instance variables and assumes the values provided are correct. Provide a set and a get method for each instance variable. Provide a method display date that displays the month,
day, and year separated by forward slashes(/). Write a test application named DateTest that demonstrates class Date's capabilities.

Step by Step Solution

3.37 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Datejava public class Date pr... View full answer

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 Programming Questions!