-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.h
More file actions
49 lines (44 loc) · 1.35 KB
/
Course.h
File metadata and controls
49 lines (44 loc) · 1.35 KB
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
47
48
49
// Name: Parthkumar Patel Date:August 2nd/2016
#ifndef SICT_COURSE_H_
#define SICT_COURSE_H_
#include <iostream>
#include <cstring>
#include <iomanip>
#include "general.h"
#include "Streamable.h"
using namespace std;
namespace sict{
class Course : public Streamable
{
char courseCode_[MAX_COURSECODE_LEN + 1];
char* courseTitle_;
int credits_;
int studyLoad_;
public:
Course();
Course(const char* courseCode, const char* courseTitle, int credits, int studyload);
virtual ~Course();
Course(const Course& src);
Course& operator=(const Course& one);
int operator+=(int studyLoad);
bool operator==(const char* courseC);
void setCourseCode(const char * courseCode);
void setCourseTitle(const char* courseTitle);
void setCredits(int credits);
void setStudyLoad(int studyLoad);
const char* getCourseCode() const;
const char* getCourseTitle() const;
int getCredits() const;
int getStudyLoad() const;
bool isEmpty() const;
ostream& display(std::ostream& py) const;
fstream& store(fstream& fileStream, bool addNewLine) const;
fstream& load(std::fstream& fileStream) ;
istream& read(istream& is) ;
friend class CourseTester;
};
//bool operator==(const Course& lhs, const Course& rhs);
std::ostream& operator<<(ostream& py, const Course& A);
};
#endif
#pragma once