-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPolygonShape.h
36 lines (28 loc) · 953 Bytes
/
PolygonShape.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// PolygonShape.h
// WhatATool2
//
// Created by Ed on 28/06/09.
// Copyright 2009 Ed Lui. All rights reserved.
//
#define kMinimumNumberOfSides 3
#define kMaximumNumberOfSides 12
@interface PolygonShape : NSObject {
int numberOfSides;
int minimumNumberOfSides;
int maximumNumberOfSides;
}
@property (nonatomic) int numberOfSides;
@property (nonatomic) int minimumNumberOfSides;
@property (nonatomic) int maximumNumberOfSides;
@property(readonly) float angleInDegrees;
@property(readonly) float angleInRadians;
@property(readonly) NSString *name;
- (id)initWithNumberOfSides:(int)sides;
- (id)initWithNumberOfSides:(int)sides minimumNumberOfSides:(int)min;
- (id)initWithNumberOfSides:(int)sides minimumNumberOfSides:(int)min maximumNumberOfSides:(int)max;
- (BOOL)isValidNumberOfSides:(int)sides;
- (BOOL)isValidMinimumNumberOfSides:(int)sides;
- (BOOL)isValidMaximumNumberOfSides:(int)sides;
- (NSString *)description;
@end