Giter Site home page Giter Site logo

ruby-oo-relationships-practice-gym-membership-exercise's Introduction

DO YOU EVEN LIFT!?

Anupam Mahapatra on Unsplash

Word has just come from the higher-ups, and you're in charge of building out a domain that keeps track of weightlifters and the gyms they lift at. Yes gyms. Everyone knows you need a weekday gym and a weekend gym. And one for when you're traveling, and one that you go to just to show off. Oh, and that one with a really great steam room. Gotta love the steam room.

Setup (Code Overview)

Your goal is to build out all of the methods listed in the deliverables. Do your best to follow Ruby best practices. For example, use higher-level array methods such as map, select, and find when appropriate in place of each.

We've provided you with a console that you can use to test your code. To enter a console session, run ruby tools/console.rb from the command line. You'll be able to test out the methods that you write here. Take a look at that file to see how you can pre-define variables and create object instances, rather than manually doing it in every single console session.

There are no tests! You will need to test your code on your own!!

Troubleshooting: If ruby tools/console.rb does not work, try running bundle install in your terminal.

Deliverables

Here's what we need to be able to do.

Lifter

  • Get a list of all lifters

  • Get a list of all the memberships that a specific lifter has

  • Get a list of all the gyms that a specific lifter has memberships to

  • Get the average lift total of all lifters

  • Get the total cost of a specific lifter's gym memberships

  • Given a gym and a membership cost, sign a specific lifter up for a new gym

Membership

  • Get a list of all memberships

Gym

  • Get a list of all gyms

  • Get a list of all memberships at a specific gym

  • Get a list of all the lifters that have a membership to a specific gym

  • Get a list of the names of all lifters that have a membership to that gym

  • Get the combined lift total of every lifter has a membership to that gym

ruby-oo-relationships-practice-gym-membership-exercise's People

Contributors

drakeltheryuujin avatar hysan avatar ihollander avatar maxwellbenton avatar notnotdrew 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.