final_project/Interface.cpp
// list assignments (and scores needed to reach each letter grade)

list assignments (and scores needed to reach each letter grade)
list assignments ( and scores needed to reach each letter grade )
void list_assignments(const std::vector<Grade>& grades){
        if (grades.empty()){
            std::cout << "There are currently no assignments to list.\n";
            return;
        }
        std::cout << "+----+-------------------+-------+\n";
        std::cout << "| " << std::left << std::setw(3) << '#' << "| "
            << std::setw(18) << "Assignment" << "| " << std::setw(6)
            << "Score" << "|\n"
            << "+----+-------------------+-------+\n";
        for (unsigned i = 0; i < grades.size(); ++i){
            const Grade& grade = grades[i];
            std::cout << "| " << std::left << std::setw(3) << i+1 << "| "
                << std::setw(18) 
                << grade.get_title() << "| " << std::setw(6)
                << grade.get_score() << "|\n"
                << "+----+-------------------+-------+\n";
        }
    }
void list_assignments ( const std :: vector < Grade > & grades ) { if ( grades . empty ( ) ) { std :: cout << " \n " ; return ; } std :: cout << " \n " ; std :: cout << " " << std :: left << std :: setw ( 3 ) << ' ' << " " << std :: setw ( 18 ) << " " << " " << std :: setw ( 6 ) << " " << " \n " << " \n " ; for ( unsigned i = 0 ; i < grades . size ( ) ; ++ i ) { const Grade & grade = grades [ i ] ; std :: cout << " " << std :: left << std :: setw ( 3 ) << i + 1 << " " << std :: setw ( 18 ) << grade . get_title ( ) << " " << std :: setw ( 6 ) << grade . get_score ( ) << " \n " << " \n " ; } }
list assignments (and scores needed to reach each letter grade)
list assignments ( and scores needed to reach each letter grade )
// somewhat WET but this is acceptable
 // length of "Abstraction Bonus" +1
