Coder Social home page Coder Social logo

andela-bootcamp-projects's Introduction

ANDELA BOOTCAMP PROJECTS

BOOTCAMP PROJECT DAY 2

WEATHER API

This application implements a logic that gives the weather information of a place by making use of the darksky public weather api. This api takes two parameters which are the latitude and longitude of the place. The application takes in command line arguments using a flag **(-a). ####Example Simply run this command on the command line.
node api.js -a address

####HOW IT WORKS The application first makes a call to Google Map services using google map API to retrieve the latitude and longitude coordinates of the address, then it makes a second call to the darksky services using their weather API and the latitude and longitude of the address to retrieve weather information for the address. Information such as:

  • Temperature
  • Apparent Temperature
  • Wind Speed
  • Pressure
  • Visibility

##BOOTCAMP PROJECT DAY 1 ###OBJECT ORIENTED PROGRAMMING ###

This implements the object oriented paradigm. In this project Animal was used to model a class for different types of animal. Any type of animal can inherit from the Animal class and call methods defined in that class. For example in this project, a fish and a dog class was sub-classed from the Animal class, which gives them access to call methods defined in the animal class.

####Methods These are some methods from the animal class that can be called and over-ridden by subclasses

  • getName()
  • setName(newName)
  • move(speed)
  • eat()
  • setAge(newAge)
  • getColor()
  • getAge()

####Example var dog1 = new Dog("Bingo", 25, "Black");
From the above instantiation, dog1 is an instance of the Dog class which is a subclass of the Animal class. Therefore dog1 can access the methods and properties of the Animal class because it is also an instance of the Animal class

dog1.getName() = "Bingo"
dog1.getAge() = 25
dog1.getColor() = "Black"

###DATA TYPE PROGRAMMING TASK This implements a programming logic that checks the data type of the passed input and return appropriate message. The function is called like this dataTypes(parameter);.

####Predefined Output Messages If input is of type:

  • string => the length will be returned
  • number => returns either the number is greater than, or less than, or equal to 100
  • boolean => return the boolean passed in as argument
  • object => if object is an array, it returns 'the third element in the array' if it exist, if not it returns 'undefined'. if the object is not an array, it returns 'undefined'
  • function => returns 'called callback' by calling the function and passing 'true' as argument

####Example dataType(32) => "less than 100"
dataType("hello") => 5
dataType(true) => true
dataType(undefined) => undefined
dataType([2,3,4]) => 4
dataType(function(param)) => called callback

###FINDING THE PRIME NUMBERS IN A SEQUENCE This is a programming logic that filters out the prime numbers within a sequence of numbers based on the passed in limit of the sequence. This logic tries to uphold asymptotic analysis by reducing its time and memory complexity to the lowest regardless of the input size.
The function is called like this getPrime(parameter)
####Example getPrime(10) => [2,3,5,7]
getPrime(20) => [2,3,5,7,11,13,17,19]

andela-bootcamp-projects's People

Contributors

koyexes avatar

Watchers

 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.