concept ctrentalproperty class in category ios

appears as: CTRentalProperty class, The CTRentalProperty class
Objective-C Fundamentals

This is an excerpt from Manning's book Objective-C Fundamentals.

One of the first steps in defining a new class is to determine the type of data it needs to store. For the CTRentalProperty class, you want to store data similar to that which you previously stored in the RentalProperty structure. At a minimum, you’d like to store the following data for each rental property:

As an example, add the following method declaration to the @interface section of the CTRentalProperty class:

- (id)initWithAddress:(NSString *)newAddress
    rentalPrice:(float)newRentalPrice
    andType:(PropertyType)newPropertyType;

This instance method enables you to provide a new address, rental price, and property type for the object about to be initialized. The next step is to provide an implementation for the method in the @implementation section of the CTRentalProperty class. Do this by adding the following code.

Listing 5.1. Defining the interface of the CTRentalProperty class