Lecture Notes on 02 Sep 2020 def word_search (word_grid, word_to_search): # some code def test_cases(): # test function word_search assert word_search ([['a']], 'a') == (0, 0) assert word_search ([['a']], 'z') == (-1, -1) assert word_search ([['i', 't'], ['n', 'o']], 'to') == (0, 1) # other test cases # return result return "all test cases passed" def main(): # call test_cases # print (test_cases()) main() * Principles of Object Oriented Programming - Abstraction: finding attributes and behaviors of objects - Encapsulation: creating a class that has the attributes and behaviors - Information Hiding: make attributes private and make behaviors public - Inheritance: - create a structure (basically a tree structure) for the classes that we create the relationship between classes in the hierarchy is given by the phrase "is-a" or "is-an" - code reuse * Inheritance Hierarchy American Texan New_Yorker Californian Austinite Houstonian