title: Create array from objects from different classes?
body: <p>I posted similar question but now I have some other subquestions.</p>
  
  <p>So I have a Factory class. This Factory produces Devices (class devices). Devices class has some properties and has several subclasses: Watches, Smartphones, Computers.
  This factory can produce 200 devices. </p>
  
  <pre><code>self.factoryArray = [[NSMutableArray alloc]initWithCapacity:200];
  </code></pre>
  
  <p>I want to create objects from Watches, Smartphones and computers class and put them into this array. In Factory class i have method createDevice </p>
  
  <pre><code>- (void)createDevice {
  while (self.factoryArray.count &lt; 200) {
  
      Devices *device = [[Devices alloc]init];
      [self.factoryArray addObject:device];
  
    }  
  }
  </code></pre>
  
  <p>Now, how to randomly associate each device (object from factoryArray) to a class object Watch or Smartphone or etc...</p>