Demonstrates the class simpledates capabilities


Discuss the below:

Q1: Create a class called SimpleDate that includes three instance variables - a month, a day and a year (all type int). Provide a constructor that initializes the three instance variables and validates that those values are correct (follow calendar rules) and throws an exception for incorrect values. Provide a set and get method for each instance variable. Provide a toString method override that displays the month, day and year separated by forward slashes (/).

Q2: Write a test application named SimpleDateTest that demonstrates class SimpleDate's capabilities

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Demonstrates the class simpledates capabilities
Reference No:- TGS01934352

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)