User Tools

Site Tools


haas:fall2011:cprog:projects:age

Age Calculation

In this project your task is to calculate your age in units other than standard Earth years.

Premise

On Earth, 1 year is approximately 365 days, or the number of days it takes the Earth to complete a cycle around our star. We measure our age in units of Earth years.

But this is not the only valid unit for representing our age, even if it is the most practical. Here we will explore implementing the necessary calculations to determine our age from different perspectives in our solar system.

You will likely need to consult some external references (NASA, Wikipedia) to derive appropriate information.

Programming Considerations

  • Prompt the user to enter their month, day, and year of birth (you may want to store each of these in a separate variable).
  • Query the system to obtain the current date.
  • Compare the current date to the user's information to determine their current age in Earth years.
  • Calculate and display the user's age for the following objects:
    • Mercury
    • Venus
    • Mars
    • Asteroid Vesta (in the Asteroid belt)
    • Saturn
    • Halley's Comet
    • Some other object in the Sol system (our solar system) of your choice
haas/fall2011/cprog/projects/age.txt · Last modified: 2011/08/21 15:49 by 127.0.0.1