A School Directory Application
Package to illustrate classes, subclasses, polymorphism,cout<<<overloading, and virtual functions
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Staff Class Reference

#include <Staff.h>

Inheritance diagram for Staff:
Inheritance graph
[legend]
Collaboration diagram for Staff:
Collaboration graph
[legend]

Public Member Functions

 Staff (std::string first, std::string last, std::string addr, std::string room, int ext, std::string ttl)
 
std::ostream & print (std::ostream &os) const
 
- Public Member Functions inherited from Entry
 Entry ()
 
 Entry (std::string first, std::string last, std::string eAddress)
 
bool equals (std::string first, std::string second)
 
bool equals (Entry otherEntry)
 
bool comesBefore (std::string first, std::string second)
 
bool comesBefore (Entry otherEntry)
 
virtual std::ostream & print (std::ostream &os) const
 
virtual ~Entry ()
 

Detailed Description


Remarks
Student: a class derived from Entry for a School Directory * a staff member's entry * inherits a first name, last name, and email address from Entry * additional fields are the member's office, extension, title *
Inherited capabilities include: * Base constructors * Comparison operations depend upon last names, then first names * Formatted orubt abd output *
Overwritten capabilities include: * Multi-parameter constructor * Formatted print method *
: files include header (Staff.h), Implementation (Staff.cpp) *
Uncomment a main program for unit testing *
Author
Henry M. Walker *
Date
January 11, 2023 *
Remarks
References *
A School Directory as an Example of Object-Oriented Design * http://localhost/courses/cpp-style-guide/directory/index.php *

Full-parameter constructor *
Parameters
firsta staff member's first name *
lasta staff member's last name *
eAddressa staff member's email address *
rooma staff member's office *
extthe telelphone number extension for the office *
titlethe staff member's title *

Constructor & Destructor Documentation

◆ Staff()

Staff::Staff ( std::string  first,
std::string  last,
std::string  addr,
std::string  room,
int  ext,
std::string  ttl 
)

Remarks
Student: a class derived from Entry for a School Directory * a staff member's entry * inherits a first name, last name, and email address from Entry * additional fields are the member's office, extension, title *
Inherited capabilities include: * Base constructors * Comparison operations depend upon last names, then first names * Formatted orubt abd output *
Overwritten capabilities include: * Multi-parameter constructor * Formatted print method *
: files include header (Staff.h), Implementation (Staff.cpp) *
Uncomment a main program for unit testing *
Author
Henry M. Walker *
Date
January 11, 2023 *
Remarks
References *
A School Directory as an Example of Object-Oriented Design * http://localhost/courses/cpp-style-guide/directory/index.php *

Member Function Documentation

◆ print()

std::ostream & Staff::print ( std::ostream &  os) const
virtual

Remarks
output a format Faculty object *
Parameters
osoutput stream which will receive the formatted Faculty data *
  • @ewmrk by being a virtual function, implementations in subclasses * will be interpreted via polymorphism *
Returns
formatted string on the given output stream *

Reimplemented from Entry.

Here is the call graph for this function:

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