-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAC2313.h
37 lines (35 loc) · 1.1 KB
/
MAC2313.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "Course.h"
#include <array>
#include <iostream>
using namespace std;
//this bit says that this particular class is a child of Course
class MAC2313 : public Course {
private:
//NOTE: this class is entirely percentage based according to the syllabus
//This means grades need to be entered as percentage values
//For example, if they got a 95% on the first exam and 87% on the next two
//They would enter 95, 87, and 87
//There are 3 exams and a final in this class
double participation;
double webAssign[27];
array<double, 27> tempWebAssign;
double quizzes[13];
array<double, 13> tempQuizzes;
//helper functions for calc gpa
double pointSummer(double[], int);
double examPointSummer(array<double, 20>);
public:
//constructor
MAC2313();
//calculates the gpa for the given class
void calcGpa();
//setters for private variables
void updateParticipation(double);
void updateWebAssign(int, double);
void updateQuiz(int, double);
void updateExam(int, double);
void updateFinal(double);
//prints all grade values for given class
void printAll();
};