/galactic_age_calculator

This app determines a user's age based on a planet's solar years.

Primary LanguageJavaScript

Super Galactic Age Calculator

¨ ¨ ¨ ¨

This app determines user's age based on a planet's solar years.


By Roman Kolivashko

Technologies Used

  • HTML
  • CSS
  • JQuery
  • webpack
  • Jest
  • Bebel
  • Linter

Description

A solar year lasts 365 days on planet Earth. However, the length of a solar year varies from planet to planet. For instance, a solar year on Mercury lasts 88 days. This application determines a user's age based on a planet's solar years.

The business logic of your application should take a person's age in years and create a class that does the following:

  • Returns their age in Mercury years. (A Mercury year is .24 Earth years.)
  • Returns their age in Venus years. (A Venus year is .62 Earth years.)
  • Returns their age in Mars years. (A Mars year is 1.88 Earth years.)
  • Returns their age in Jupiter years. (A Jupiter year is 11.86 Earth years.)
  • Determines how many years a user has left to live on each planet… (yikes!) To do this, the application will have to calculate the user's life expectancy.
  • If a user has already surpassed the average life expectancy, return the number of years they have lived past the life expectancy.

Setup/Installation Requirements

  1. Click on "Code" button at top of GitHub repository.
  2. Clone the repository: $ git clone https://github.com/romankolivashko/galactic_aga_calculator.git
  3. Navigate to the galactic_age_calculator/ directory on your computer
  4. To start a development server and view the project in the browser:
    • Navigate to galactic_age_calculator/ in your command line
    • Run the command npm install to install dependencies
    • Optionally, run the commmand npm run build to make a bundle of the files
    • Finally, run the command npm run start to start a development server

To run tests, navigate to my-project/ in your terminal and run the command npm run test

How to access the app from the web

  • Follow the link here

Known Bugs

  • None so far

License

MIT

Contact Information

rkolivashko@gmail.com