Giter VIP home page Giter VIP logo

flatiron-bnb's Introduction

FlatironBNB

We are building the greatest next app in the world, FlatironBNB! Our app has yet to be finished though. However, we hired an amazing programmer (YOU), to finish it out. Unfortunately, you are doing this pro bono, so no money.

Domain Considerations

Think about this particular program from the perspective of a given user. A user makes a reservation to a listing (you can think of this as a home). Therefore, a user can have many reservations, a user has many listings through reservations.

Deliverables

These are some of the methods you should try to make sure to implement:

User

  • User#age
    • Returns the age for the user
  • User#name
    • Returns the name for the user
  • User#make_reservation(listing, nights)
    • Takes in a Listing object and the number of nights that the user will be staying, returns the reservation
  • User#reservations
    • Returns an array of reservations that the user has
  • User.all
    • Returns an array of all users

Reservations

  • Reservation#user
    • Returns the User object
  • Reservation#listing
    • Returns the Listing object
  • Reservation#nights
    • Returns the number of nights the reservation is for
  • Reservation.all
    • Returns an array of all reservations

Listing

  • Listing#location
    • Returns the location for a given listing
  • Listing#description
    • Returns a description for a listing
  • Listing#average_stay
    • Returns the average stay at a given listing
  • Listing#eldest_guest
    • Returns the eldest guest at a given listing
  • Listing.most_popular
    • Returns the Listing that has the most reservations
  • Listing.all
    • Returns an array of all listings

flatiron-bnb's People

Contributors

maxcell 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.