Coder Social home page Coder Social logo

friday_solo_project5's Introduction

~Galactic Age Calculator~

Authored by Max Brockabnk

Updated on Feb 1th, 2021

Description

Takes in user input, creating a new object whose methods calculate how old you would be in terms of other planets years. Utilizes JavaScript classes and class methods, template literals, and the NPM package Jest for testing and using TDD concepts.

Required Technologies

  • Modern Browser
  • Text editor
  • Node.js

Set-up Instructions

  1. Clone this repo to your desktop
  2. Run npm install to get node modules
  3. Run npm run start to start development server and view in the broweser

Technologies Used

  • JavaScript/jQuery
  • NPM/Webpack/Jest

Known Bugs

  • UI has no validation so you could submit the form without any input and get the response text back with NaN where ages should be and no name filled in.

Specs

Behavior Input Output
1. Create new instance of the Galactic_Age class, passing in user's name and age Greg, 21 object.values(greg) = ["Greg", 21]
2. Accuratley produce input age in Mercury years, which is about 88 Earth days per solar year, rounded down to nearest whole number. greg.mercuryAge = 87
3. Accuratley produce input age in Venus years, which is about 225 Earth days per solar year, rounded down to nearest whole number. greg.venusAge = 34
4. Accuratley produce input age in Mars years, which is about 687 Earth days per solar year, rounded down to nearest whole number. greg.marsAge = 11
5. Accuratley produce input age in Jupiter years, which is about 4,333 Earth days per solar year, rounded down to nearest whole number. greg.jupiterAge = 1
6. Add average life expectancy of about 72 years as estimated by the UN in 2019, as expectedLife property to Galactic_Age class constructor greg.expectedLife = 72
7. Check life expectancy against different planet ages and return proper response greg.mercuryAge "15 years past life expectancy"
8. Allow user to adjust life expectancy property, this will be another adjustment to the existing test for spec #1.

Legal

  • Copyright © 2020 Max Brockbank
  • This software is licensed under the MIT license

friday_solo_project5's People

Contributors

maxbrockbank avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.