-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstudentModel.m
47 lines (36 loc) · 846 Bytes
/
studentModel.m
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
37
38
39
40
41
42
43
44
45
46
47
//
// studentModel.m
// Solvalyzer
//
// Created by david hilton shanabrook on 5/20/11.
// Copyright 2011 Diabolical Labs, LLC. All rights reserved.
//
#import "studentModel.h"
static StudentModel *sharedStudentModel;
@implementation StudentModel
@synthesize correctnessLevel;
@synthesize correctnessCutoff;
- (id)init{
self = [super init];
if (self) {
}
[self setCorrectnessCutoff:3];
[self setCorrectnessLevel: 0];
return self;
}
- (void) incCorrectnessLevel{
correctnessLevel++;
}
-(void) decCorrectnessLevel{
correctnessLevel = correctnessLevel - 1;
}
+ (StudentModel *) sharedStudentModel{
if (!sharedStudentModel) {
sharedStudentModel = [[StudentModel alloc] init];
}
return sharedStudentModel;
}
- (void)resetSharedStudentModel {
self.correctnessLevel = 0;
}
@end