-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassignment.cpp
More file actions
46 lines (45 loc) · 898 Bytes
/
Copy pathassignment.cpp
File metadata and controls
46 lines (45 loc) · 898 Bytes
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
43
44
45
46
#include "assignment.h"
int Assignment::total_assignments = 0;
Assignment::Assignment()
: name(""), points_possible(0.0f), points_earned(0.0f), bonus(false)
{
++total_assignments;
}
// Setters
void Assignment::setName(const std::string &name)
{
this->name = name;
}
void Assignment::setPointsPossible(float points_possible)
{
this->points_possible = points_possible;
}
void Assignment::setPointsEarned(float points_earned)
{
this->points_earned = points_earned;
}
void Assignment::setBonus(bool bonus)
{
this->bonus = bonus;
}
// Getters
std::string Assignment::getName() const
{
return name;
}
float Assignment::getPointsPossible() const
{
return points_possible;
}
float Assignment::getPointsEarned() const
{
return points_earned;
}
bool Assignment::isBonus() const
{
return bonus;
}
int Assignment::getTotalAssignments()
{
return total_assignments;
}