(Median: the numerical value separating the higher half of a data sample from the lower half. Example: if the series is

2, 7, 4, 9, 1, 5, 8, 3, 6

then the median is 5.)

Model the data structure for a component that would have these two methods:

@interface SampleHandler {

– (void)addNumber:(NSNumber*)number;

– (NSNumber*)median;

}

Justify your decisions. Calculate the complexity of each method.