import java.util.Scanner; import java.util.StringTokenizer; /** Driver.java - Interactive main program to practice the calendar * functions. This file contains main(). All the implementations are * in the other files. */ public class Driver { public static void main(String [] args) { Scanner kbd = new Scanner(System.in); System.out.printf("Enter a date of the form mm/dd/yyyy: "); String line = kbd.nextLine(); StringTokenizer tok = new StringTokenizer(line, " /"); int month = Integer.parseInt(tok.nextToken()); int day = Integer.parseInt(tok.nextToken()); int year = Integer.parseInt(tok.nextToken()); // Let's call the calendar functions. // YOU NEED TO MODIFY THE RIGHT SIDE OF EACH ASSIGNMENT STATEMENT boolean leapYear = true; int daysInMonth = 0; int julianDay = 0; String sign = "error"; String horoscope = "I don't know"; // Output System.out.printf("Is it a leap year? "); System.out.println(leapYear); System.out.printf("The month has %d days.\n", daysInMonth); System.out.printf("The Julian day is %d.\n", julianDay); System.out.printf("The sign of the Zodiac is %s.\n", sign); System.out.printf("The horoscope for that birthday is:\n%s\n", horoscope); } }