lab_memory
Malevolent Memories
Letter Class Reference

Represents a group of students with the same first letter of their last name. More...

#include "letter.h"

Public Member Functions

 Letter ()
 Letter constructor. More...
 
void addStudent ()
 Adds one additional student to the letter group. More...
 
bool operator< (const Letter &other) const
 Comparator for letters (to allow for sorting). More...
 

Public Attributes

char letter
 The character this Letter represents. More...
 
int count
 How many students have been allocated for this letter. More...
 

Detailed Description

Represents a group of students with the same first letter of their last name.

Constructor & Destructor Documentation

Letter::Letter ( )

Letter constructor.

Initializes the letter to '-' with 0 students The letter should be set by the client.

Member Function Documentation

void Letter::addStudent ( )

Adds one additional student to the letter group.

bool Letter::operator< ( const Letter other) const

Comparator for letters (to allow for sorting).

Parameters
otherA Letter to compare against
Returns
Whether the parameter is less than this Letter.

Member Data Documentation

char Letter::letter

The character this Letter represents.

int Letter::count

How many students have been allocated for this letter.


The documentation for this class was generated from the following files: