#include "Course.h" #include #include using namespace std; Course::Course() {} Course::Course(int a, int b, int c) {math = a; english = b; computer = c;} void Course::setMath(int v) {math = v;} void Course::setEnglish(int v) {english = v;} void Course::setComputer(int v) {computer = v;} int Course::getMath() const {return math;} int Course::getEnglish() const {return english;} int Course::getComputer() const {return computer;} int Course::getSum() const {return math+english+computer;} float Course::getAverage() const {return (math+english+computer)/3.0f;} void Course::printScore() {cout << math << ' ' << english << ' ' << computer << " Sum:" << getSum() << " Average:" << fixed << setprecision(1) << getAverage();}