Skip to content

Magic Numbers in Exam and Course Validation #11

@DanielBr840

Description

@DanielBr840

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;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions