-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMhs.h
66 lines (58 loc) · 1.29 KB
/
Mhs.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// Created by Legion Y530 on 12/31/2021.
//
#ifndef NABIL_MHS_H
#define NABIL_MHS_H
#include <iostream>
#include <string>
using namespace std;
class Mhs {
private:
string nama;
string nim;
string topikTA;
int sksLulus;
public:
// Constructor
Mhs() {}
Mhs(string nama, string nim, string topikTA, int sksLulus) {
this->nama = nama;
this->nim = nim;
this->topikTA = topikTA;
this->sksLulus = sksLulus;
}
// Setter
void setNama(string n) {
nama = std::move(n);
}
void setNim(string n) {
nim = std::move(n);
}
void setTopikTA(string t) {
topikTA = std::move(t);
}
void setSksLulus(int s) {
sksLulus = s;
}
// Getter
basic_string<char> getNama() {
return nama;
}
basic_string<char> getNim() {
return nim;
}
basic_string<char> getTopikTA() {
return topikTA;
}
int getSksLulus() const {
return sksLulus;
}
string print() {
return
"Nama : " + getNama() + "\n" +
"NIM : " + getNim() + "\n" +
"Topik TA : " + getTopikTA() + "\n" +
"Jumlah Bimbingan: " + to_string(getSksLulus()) + "\n\n";
}
};
#endif //NABIL_MHS_H