Skip to content

Latest commit

 

History

History
 
 

2_drawer_debugger

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Week 6 Home

U2.W6: Drawer Debugger

Learning Competencies

  • Use error messages to correct syntax mistakes and/or drive development
  • Define a method's responsibility

Summary

You will run into numerous error messages as a developer, so it's important to know what they mean and how to read them. The messages provide valuable information on where your program is having problems, but sometimes the messages are misleading, especially if you have little practice interpreting them. In this challenge, you need to work through the error messages until the program runs properly.

Release 0: Indent the code properly

Release 1: Debug the program

Run the code from the console. You should encounter 5 errors before it will run completely (excluding the bonus - uncomment the line to work on it). Read each error carefully and fix it.

Release 2: Create/modify methods

Ensure each method is working as expected. You may need to create or modify methods to make the program run properly.

Release 3: Test!

Write tests using Driver Test Code or assert statements (make sure you have your assert method defined!)

Release 4: Call it again (x3)

Interact with the code by writing at least three more different method calls. Did they return what you expected?

Release 5: Reflect

Release 6: Push your solution to Github

Optimize your Learning! (Optional)

Uncomment the bonus section in the my_solution.rb file (except for the line that says bonus section) and write the code to make the driver code run as you would expect.