
- Ruby
- Beginner
About this Course
In this course, you'll build a simple command line address book application using Ruby. You'll put to use a lot of skills learned in previous courses to put everything together: objects, classes, blocks, input and output, and more.
What you'll learn
- Object Oriented Programming
- Loops
- Classes
Class Design
In this stage we're going to start to design the classes that we'll use throughout the rest of the address book program.
11 steps-
Contact Class: Part 1
6:05
-
Create a Contact Class
1 objective
-
Contact Class: Part 2
4:04
-
Write a Method
1 objective
-
Phone Number Class
6:15
-
Write a to_s Method
1 objective
-
Address Class: Part 1
5:00
-
Address Class: Part 2
3:44
-
Initializing and Calling Methods
2 objectives
-
Address Book Class
4:25
-
Instance variable instantiation
2 objectives
Search
Search is an integral part of any address book application. In this stage, you'll learn how to add the ability to search to your classes.
6 stepsInput and Output
Our program functionality is all set up but our users have no way to interact with the program. In this stage we add a UI to the application and add a text based menu and interaction system.
8 steps-
Displaying a Menu
3:57
-
Instance Variable Access
1 objective
-
Adding Contacts: Part 1
4:41
-
Adding Contacts: Part 2
4:45
-
Searching the Address Book
2:50
-
Searching the Address Book
2 objectives
-
Saving The Address Book
8:14
-
Review
4 questions
-
Extra Credit
Our program is in good shape but is lacking in some functionality. For extra credit, try adding the ability to delete contacts from the address book. You can also modify the address book program to use the methods we created for interacting with the address and phone numbers in the contact class.
Teacher
-
Jason Seifer
Jason helped launch Treehouse and spent 4 years teaching here before returning to Rails development full time.