Skip to content

tiyd-rails-2015-01/odd_array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

OddArray

Description

Create one (very odd) class that contains an Array but only allows odd items to be stored in it.

Instructions

You are a (very odd) mathematician who has set out to prove that any mathematical operation can be performed using only odd numbers (e.g. 1, 3, 5, 333) and no even numbers (e.g. 2, 4, 6, 448). You'll be writing a lot of code along the way, but before you get started on the mathy stuff, you want to make sure that you have a class which will help you with the basics. You need a class like an array which will only store odd numbers in it.

Another (very odd) mathematician has come before you, and she has written a test suite. Copy the test suite in this repository folder to your computer and write code in a new file called odd_array.rb to make the tests pass. To run the tests, type ruby odd_array_test.rb in Terminal (after you've cd'd to the correct folder).

Start by making the first test pass, then move on to the next, and so on.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages