OK. Your problem is three parts. Inputting user input and parsing it, performing the calculation and then outputting the value.
For user input you can use Integer.parseInt() on the String arguments provided to main( String [] args ) all inside a test for the correct number of arguments and an exception handler for bad input. Are you confident of that part?
I think so. So far I have done this:
//Date Created: 28 April 2015
//Date Last Changed: 28 April 2015
//This program calculates the number of days the user has been alive
//Input: .txt, Output: None
import java.util.Scanner;
public class DaysAlive {
/**
* Launch the application
*/
/*Global Values*/
public static int iDayBirth, iMonthBirth, iYearBirth;
public static int iDayCurrent, iMonthCurrent, iYearCurrent;
static int iDaysAlive;
public static void main(String[] args) {
/*Calender Array:*/
int Calender[]= new int[13];
Calender[0]= 0;
Calender[1]= 31;
Calender[2]= 28;
Calender[3]= 31;
Calender[4]= 30;
Calender[5]= 31;
Calender[6]= 30;
Calender[7]= 31;
Calender[8]= 31;
Calender[9]= 30;
Calender[10]= 31;
Calender[11]= 30;
Calender[12]= 31;
/*Birth Dates:*/
Scanner inConsole = new Scanner (System.in);
/*Day of Birth*/
System.out.print("Enter the Day of the Date of Birth: ");
iDayBirth = inConsole.nextInt();
/*Month of Birth*/
System.out.print("Enter the Month of the Date of Birth: ");
iMonthBirth = inConsole.nextInt();
/*Year of Birth*/
System.out.print("Enter the Year of the Date of Birth: ");
iYearBirth = inConsole.nextInt();
/*Current Dates:*/
/*Current Day*/
System.out.print("Enter the Current Day: ");
iDayCurrent = inConsole.nextInt();
/*Current Month*/
System.out.print("Enter the Current Month: ");
iMonthCurrent = inConsole.nextInt();
/*Current Year*/
System.out.print("Enter the Current Year: ");
iYearCurrent = inConsole.nextInt();
/*Code to calculate the number of days alive*/
/*Print the results*/
System.out.println(iDaysAlive);
}
}