Giter Site home page Giter Site logo

dogs-and-owners-build-and-burn's Introduction

Classes and Objects Build and Burn

In this, you'll create an app that keeps track of dogs and their owners.

Setup

  1. Make an environment.rb file
  2. Make Dog.rb, Owner.rb, and DogOwner.rb class files
  3. Require all of your dependencies, including pry
  4. Verify that running your environment file works

Dog

  1. Create a Dog class
  2. Add a constructor that accepts a name and an age
  3. Add readers for name and age
  4. Create 2 Dog instances in your environment
  5. Verify that your dogs are in your environment when you run your app

Owner

  1. Create an Owner class
  2. Add a constructor that accepts a name
  3. Add a reader for name
  4. Create 2 Owner instances in your environment
  5. Verify that your owners are in your environment when you run your app

DogOwner

  1. Create a DogOwner class
  2. Add a constructor that accepts a dog and an owner
  3. Add readers for dog and owner
  4. Keep track of all DogOwner instances that have been created
  5. Allow all of the DogOwner instances to be read
  6. Create 3 DogOwner instances in your environment
  7. Verify that your dog owners are in your environment when you run your app

Adding Dogs

  1. Create a method for adding a dog to an owner
  2. Create a method for getting all of an owner's dogs
  3. Verify that you can get all of an owner's dogs when you run your app

Adding Owners

  1. Create a method for adding an owner to a dog
  2. Create a method for getting all of an dog's owners
  3. Verify that you can get all of an dog's owners when you run your app

Average Age

  1. Create a method for calculating the average age of an owner's dog's
  2. Verify that you can get all of an owners' dogs' ages when you run your app

Once you've done all of this, delete your files and do it again. Repeat until you can do all of the steps without thinking about them.

dogs-and-owners-build-and-burn's People

Contributors

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