Created
April 8, 2015 00:17
-
-
Save elskwid/687ee5667acb847a4237 to your computer and use it in GitHub Desktop.
Warmup for TECH603 Day 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Create a class named Country | |
# 2. Add the ability to read and write an attribute named "name". This should | |
# be done using two methods. | |
# HINT: the writer method has the `=` at the end | |
# HINT HINT: use an ivar to store the name in the scope of the class | |
# 3. Create an instance of your Country class | |
# 4. Set the name attribute | |
# 5. Get and display the name attribute | |
# 6. Add support to read and write an attribute named "id", but this time use | |
# the Ruby macros for readers and writers. | |
# 7. Set and get the id attribute | |
# 8. Modify country to allow you to pass the name and id in when the country | |
# is created. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment