As a C++ programming language, you have a file to define the attributes and methods and other file to implementation. In objective-c the way to do it are similar, to create a class you want, firstly, to write @interface … and all classes in Objective C inherits from NSObject(Java Object hahah ).

You can check the getters and setters from each attribute of the class… Yeah.. by default(convention maybe) you don’t need to put “getDenominator”, getAttribute, but the set is the same as Java, for example.
If you like Ruby for example, you figure out that ruby has a syntatic sugar to create getters/setters for an attribute. Objective C has a similar notation to do it… It’s a @property. So, our Fraction class will look: