-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAC2312.h
42 lines (40 loc) · 1.26 KB
/
MAC2312.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
38
39
40
41
42
#pragma once
#include "Course.h"
#include <array>
#include <iostream>
using namespace std;
#ifndef _MAC2312_H_
#define _MAC2312_H_
//this bit says that this particular class is a child of Course
class MAC2312 : public Course {
private:
//NOTE: 3 exams 60 points each, 80 point final
//course grade is out of 400 points
double hittPoints; //35 points
double participation; //4 points
double webAssign;//50 max out of 54.5 points, a double because no specific number of assignments is given in syllabus
double quizzes[8]; //best 6 of 8, 6 points each
array<double, 8> tempQuizzes;
double writtenHomework[3]; //3 collected, 5 points each
array<double, 3> tempWrittenHomework;
//helper functions for calc gpa
double pointSummer(double[], int);
double examPointSummer(array<double, 20>);
double bestOfQuizzes(double[]);
public:
//constructor
MAC2312();
//calculate gpa based on all grades in class
void calcGpa();
//setters for private variables
void updateHittPoints(double);
void updateWebAssign(double);
void updateQuiz(int, double);
void updateWrittenHomework(int, double);
void updateParticipation(double);
void updateExam(int, double);
void updateFinal(double);
//prints all of the grade values
void printAll();
};
#endif