Class Dob

java.lang.Object
  |
  +--Dob

public class Dob
extends java.lang.Object


Method Summary
 int getAge()
          This function calculates age from date of birth given as parameter
 int getDay()
          Retruns date of date of birth
 int getMonth()
          Returns month of birth
 int getYear()
          Returns year of birth
 void printAge()
          Print age onto console
 void printAge(java.io.PrintStream p)
          Print age in a PrintStream object pass as a argument
 void printDob()
          Print dob onto console
 void printDob(java.io.PrintStream p)
          Print dob in a PrintStream object pass as a argument
 void setDob(int d, int m, int y)
          Settting date of birth date, month and year of birth taken as arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDob

public void setDob(int d,
                   int m,
                   int y)
Settting date of birth date, month and year of birth taken as arguments


getDay

public int getDay()
Retruns date of date of birth


getMonth

public int getMonth()
Returns month of birth


getYear

public int getYear()
Returns year of birth


getAge

public int getAge()
This function calculates age from date of birth given as parameter


printDob

public void printDob(java.io.PrintStream p)
Print dob in a PrintStream object pass as a argument


printDob

public void printDob()
Print dob onto console


printAge

public void printAge(java.io.PrintStream p)
Print age in a PrintStream object pass as a argument


printAge

public void printAge()
Print age onto console