ComputingGrade.cpp
// Will be called by "compute()" to get the exam grades & weight from the user

Will be called by "compute()" to get the exam grades & weight from the user
Will be called by " compute () " to get the exam grades & weight from the user
void computingSession::examEntity(){
    gradeEntity exams;
    int tempNum;
    std::cout << "Enter how many exams you had: ";
    std::cin >> tempNum;
    while (tempNum < 0 && tempNum > 10){
        std::cout << "That number of exams isn't possible! Please re-enter that number: ";
        std::cin >> tempNum;
        std::cout << std::endl;
    }
    std::cout << std::endl;
    exams.set_gradeNum(tempNum);
    float tempGrade;
    std::cout << "Great! Now please enter each grade, starting w/ the 1st 1: ";
    std::cin >> tempGrade;
    if (classSetup == 1)
        checkPointVal(std::cin, tempGrade);
    else
        checkGradeVal(std::cin, tempGrade);
    exams.addGrade(tempGrade);
    obtainGradesManually(tempGrade, exams);
    if (classSetup == 1){
        setEntityPointVal('e');
        float pointWeight = entityPointVals[2]/totalPoints;
        exams.setWeight(pointWeight);
    }
    else {
        float examsWeight;
        std::cout << "What is the weight of the exams? Please enter as a percentage value up to 2 decimal places: ";
        std::cin >> examsWeight;
        checkGradeVal(std::cin, examsWeight);
        exams.setWeight(examsWeight);
    }
    g.push_back(exams);
    g[2].calcEntityValue();
}
void computingSession :: examEntity ( ) { gradeEntity exams ; int tempNum ; std :: cout << " " ; std :: cin >> tempNum ; while ( tempNum < 0 && tempNum > 10 ) { std :: cout << " " ; std :: cin >> tempNum ; std :: cout << std :: endl ; } std :: cout << std :: endl ; exams . set_gradeNum ( tempNum ) ; float tempGrade ; std :: cout << " " ; std :: cin >> tempGrade ; if ( classSetup == 1 ) checkPointVal ( std :: cin , tempGrade ) ; else checkGradeVal ( std :: cin , tempGrade ) ; exams . addGrade ( tempGrade ) ; obtainGradesManually ( tempGrade , exams ) ; if ( classSetup == 1 ) { setEntityPointVal ( ' ' ) ; float pointWeight = entityPointVals [ 2 ] / totalPoints ; exams . setWeight ( pointWeight ) ; } else { float examsWeight ; std :: cout << " " ; std :: cin >> examsWeight ; checkGradeVal ( std :: cin , examsWeight ) ; exams . setWeight ( examsWeight ) ; } g . push_back ( exams ) ; g [ 2 ] . calcEntityValue ( ) ; }
Will be called by "compute()" to get the exam grades & weight from the user
Will be called by " compute () " to get the exam grades & weight from the user