consolidate all repos to one for archive
This commit is contained in:
25
semester_2/programiranje_2/primeri/Example24/Student.h
Normal file
25
semester_2/programiranje_2/primeri/Example24/Student.h
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef EXAMPLE24_STUDENT_H
|
||||
#define EXAMPLE24_STUDENT_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class Student {
|
||||
protected:
|
||||
std::string name;
|
||||
std::string faculty;
|
||||
double avgGrade;
|
||||
public:
|
||||
Student(std::string n, std::string f, double g) : name(n), faculty(f), avgGrade(g) {
|
||||
};
|
||||
virtual ~Student() {
|
||||
}
|
||||
virtual void print() const {
|
||||
std::cout << "Student: " << name << " " << faculty << " " << avgGrade << std::endl;
|
||||
}
|
||||
virtual std::string department() const {
|
||||
return faculty;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EXAMPLE24_STUDENT_H
|
||||
Reference in New Issue
Block a user