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

Will be called by "compute()" to get the quiz grades & weight from the user
Will be called by " compute () " to get the quiz grades & weight from the user
void computingSession::quizEntity(){
    gradeEntity quizzes;
    int tempNum;
    std::cout << "Alrighty then, would you please enter how many quiz grades you've got to enter?: ";
    std::cin >> tempNum;
    checkCinInt(std::cin, tempNum);
    std::cout << std::endl;
    quizzes.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);
    quizzes.addGrade(tempGrade);
    obtainGradesManually(tempGrade, quizzes);
    if (classSetup == 1){
        setEntityPointVal('q');
        float pointWeight = entityPointVals[1]/totalPoints;
        quizzes.setWeight(pointWeight);
    }
    else {
        float quizzesWeight;
        std::cout << "What is the weight of the quizzes? Please enter as a percentage value up to 2 decimal places: ";
        std::cin >> quizzesWeight;
        checkGradeVal(std::cin, quizzesWeight);
        quizzes.setWeight(quizzesWeight);
    }
    g.push_back(quizzes);
    g[1].calcEntityValue();
}
void computingSession :: quizEntity ( ) { gradeEntity quizzes ; int tempNum ; std :: cout << " " ; std :: cin >> tempNum ; checkCinInt ( std :: cin , tempNum ) ; std :: cout << std :: endl ; quizzes . set_gradeNum ( tempNum ) ; float tempGrade ; std :: cout << " " ; std :: cin >> tempGrade ; if ( classSetup == 1 ) checkPointVal ( std :: cin , tempGrade ) ; else checkGradeVal ( std :: cin , tempGrade ) ; quizzes . addGrade ( tempGrade ) ; obtainGradesManually ( tempGrade , quizzes ) ; if ( classSetup == 1 ) { setEntityPointVal ( ' ' ) ; float pointWeight = entityPointVals [ 1 ] / totalPoints ; quizzes . setWeight ( pointWeight ) ; } else { float quizzesWeight ; std :: cout << " " ; std :: cin >> quizzesWeight ; checkGradeVal ( std :: cin , quizzesWeight ) ; quizzes . setWeight ( quizzesWeight ) ; } g . push_back ( quizzes ) ; g [ 1 ] . calcEntityValue ( ) ; }
Will be called by "compute()" to get the quiz grades & weight from the user
Will be called by " compute () " to get the quiz grades & weight from the user