Computer Science, asked by najarjahangir1995, 5 months ago

(d) Create a Date class in java having day, month, and year data members. Create constructors for initializing data members , functions for validating date, getting values of data members and displaying the date .

Answers

Answered by tayyabatariq126
1

Answer:

Using Java, create a class called Date that includes three instance variables: month (of type int), day (of type int), and year (of type int). Provide a constructor that initializes the three instance variables and assumes that the values provided are correct. Provide a set and a get method for each instance variable. Provide a method called displayDate that displays the month, day, and year separated by forward slashes (/). Write a test application named DateTest that demonstrates the capabilitiesof the Date class.

Explanation:

public class className

{

//private data members

//public member functions

}

plz make me brainly

Similar questions