Giter Site home page Giter Site logo

jessica_pamanian_policy_genius_challenge's Introduction

Jessica Pamanian

npm install

copy/paste full file path to index.html in browser

Class constructors for User and Condition

  • enables reusable code --> should values for base cost or conditions change in future, can easily change inside constructor
  • User properties: name, age, gender, condition & base policy cost --> if decided to accept multiple health conditions, would use array data type instead of string
  • Condition: name, factor --> easy to update conditional increases --> getFactor() allows easy storage of multiple conditions on a single constructor
  • alternate Condition design: Condition = [ { name: 'allergies', factor: 0.01 }, { name: 'sleep apnea', factor: 0.06 }, { name: 'heart disease', factor: 0.17 } ]
  • easy to add new conditions and find correct condition
  • I chose to make a constructor with getFactor() method to keep consistent with User model and because there were only 3 possible conditions
  • to avoid giant switch statement with more than 3 conditions, I'd move to creating an object like above

Client-side architecture.

  • Scope of project is small
  • User data and policy quotes do not need to persist
  • If/when the application demands grow (data needs to persist & many customers) add server and database

SPA

  • Was easiest to display quote on same page as form
  • no need for routes

Mocha tests

npm test

jessica_pamanian_policy_genius_challenge's People

Contributors

jexeones24 avatar

Watchers

James Cloos 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.