public class Date
{
private int day;
private int month;
private int year;
public Date() //default constructor
{
...
}
public Date(int mo, int da, int yr) //constructor
{
...
}
public int month() //returns month of Date
{
...
}
public int day() //returns day of Date
{
...
}
public int year() //returns year of Date
{
...
}
//Returns String representation of Date as "m/d/y", e.g. 4/18/1985.
public string toString()
{
...
}
}
Consider the implementation of a write() method that is added to the Date class:
/** Write the date in the form m/d/y, for example 2/17/1948. */
public void write()
{
/*
implementation code */
}
Which of the following could be used as /*
implementation code */?
I Console.WriteLine(month + "/" + day + "/" + year);
II Console.WriteLine(month() + "/" + day() + "/" + year());
III Console.WriteLine(this);
(A) I only
(B) II only
(C) III only
(D) II and III only
(E) I, II, and III