Validation conditions use hardcoded numbers (<201, <=12, <7), making it difficult to understand and adjust these constraints.
|
public int FinalExamGrade |
|
{ |
|
set { if(value>0&&value<201) |
|
finalExamGrade=value; |
|
} |
|
get { return finalExamGrade; } |
|
} |
|
public int Course |
|
{ |
|
set |
|
{ |
|
if(value>0&&value<7) course = value; |
|
} |
|
get |
|
{ |
|
return course; |
|
} |
|
} |
Validation conditions use hardcoded numbers (<201, <=12, <7), making it difficult to understand and adjust these constraints.
TaskRefactoring/ClassLibrary1.cs
Lines 123 to 129 in 672599a
TaskRefactoring/ClassLibrary1.cs
Lines 173 to 183 in 672599a