grade_school: iteration 1
This commit is contained in:
parent
6055b23a3a
commit
a9b7e33d89
2 changed files with 66 additions and 0 deletions
31
cpp/grade-school/grade_school.h
Normal file
31
cpp/grade-school/grade_school.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#define EXERCISM_RUN_ALL_TESTS
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace grade_school {
|
||||
|
||||
typedef std::string name_t;
|
||||
typedef std::vector<name_t> grade_t;
|
||||
typedef int grade_number_t;
|
||||
typedef std::map<grade_number_t, grade_t> roster_t;
|
||||
|
||||
|
||||
class school
|
||||
{
|
||||
roster_t roster_;
|
||||
|
||||
public:
|
||||
|
||||
school();
|
||||
|
||||
void add(const name_t&, grade_number_t);
|
||||
|
||||
const grade_t &grade(grade_number_t) const;
|
||||
const roster_t &roster() const;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue