Ahh, thanks but I'm still really confused 
If I had a teacher and a classroom what could I use as the association because there needs to be 1
Any way in which the two are related can be an association. Which one applies depends on what the problem is, and whether we're starting from a Teacher and want to find out about Classroom, or the other way around. Here are some examples:
- Teacher teaches-in Classroom
- Teacher has-desk-in Classroom
- Teacher uses Classroom
- Classroom is-occupied-by Teacher
- Classroom hosts Teacher
Any of these are going to be represented similarly in a UML diagram:
+-------+ teaches-in +---------+ +-------+ has-desk-in +---------+
|Teacher|---------------->|Classroom| |Teacher|---------------->|Classroom|
+-------+ +---------+ +-------+ +---------+
+-------+ uses +---------+
|Teacher|---------------->|Classroom|
+-------+ +---------+
+---------+ is-occupied-by +-------+ +---------+ hosts +-------+
|Classroom|---------------->|Teacher| |Classroom|---------------->|Teacher|
+---------+ +-------+ +---------+ +-------+
Any of them are also going to be implemented similarly in C++.
class Teacher {
private:
// Rooms in which a teacher might teach
vector<Classroom> teaches_in;
...
};
class Teacher {
private:
// Room where teacher's primary desk is
Classroom* room_where_desk_is;
...
};
class Teacher {
private:
// Classrooms that a teacher uses.
vector<Classroom> rooms_used;
...
};
class Classroom {
private:
// Teachers that occupy this room during the day
vector<Teacher> is_occupied_by;
...
};
class Classroom {
private:
// Primary teacher that this room hosts
Teacher* host;
...
};