-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.h
More file actions
31 lines (25 loc) · 713 Bytes
/
Student.h
File metadata and controls
31 lines (25 loc) · 713 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
#pragma once
#include <iostream>
#include <string>
class Student {
public:
Student(const std::string& name, const std::string& address);
Student(const Student& other);
~Student();
void setName(const std::string& name);
void setAddress(const std::string& address);
void setMark(double mark);
const std::string& getCode() const;
const std::string& getAddress() const;
const std::string& getName() const;
double getMark() const;
friend std::ostream& operator<<(std::ostream& os, const Student& student);
friend bool operator<(const Student& a, const Student& b);
private:
void setCode();
private:
std::string code_;
std::string name_;
std::string address_;
double mark_;
};