I am limited to using the specified instance variables, and the specified methods. How can I create 2 DateTime objects (one for current date, and one for future date) while using these same methods for both. currentDate and futureDate should have different values, but I can't figure out how to do that while using only these methods and variables.
public class DateTime { //Enter and calculate data time
private int month; //Month instance variable
private int day; // Day instance variable
private int hour; // Hour instance variable
private int minute; // Minutes instance variable
private int second; // Second instance variable
private Scanner input = new Scanner(System.in); // Instance variable for all inputs
public void inputMonth() { // Input month value
System.out.print("Enter the month (1-12): ");
month = input.nextInt();
}
public void inputDay() { // Input days value
System.out.print("Enter the day (1-30): ");
day = input.nextInt();
}
public void inputHours() { // Input hours value
System.out.print("Enter the hour (0-23): ");
hour = input.nextInt();
}
public void inputMinutes() { // Input minutes value
System.out.print("Enter the minutes (0-59): ");
minute = input.nextInt();
}
public void inputSeconds() { // Input seconds value
System.out.print("Enter the seconds (0-59): ");
second = input.nextInt();
}
}