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
Faculty Class Reference

#include <Faculty.h>

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

Public Member Functions

 Faculty (std::string first, std::string last, std::string addr, std::string room, int ext, std::string department, int yr)
 
virtual 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
Faculty: a class derived from Entry for a School Directory * faculty entry * inherits a first name, last name, and email address from Entry * additional fields are the faculty member's office, extension, * department, and year of initial aappointment to the school *
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 (Faculty.h), Implementation (Faculty.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 *

Constructor & Destructor Documentation

◆ Faculty()

Faculty::Faculty ( std::string  first,
std::string  last,
std::string  addr,
std::string  room,
int  ext,
std::string  department,
int  yr 
)

Remarks
Full-parameter constructor *
Parameters
firsta faculty member's first name *
lasta faculty member's last name *
eAddressa faculty member's email address *
rooma faculty member's office *
extthe telelphone number extension for the office *
departmentthe faculty member's [primary] department *
yrthe year of the faculty member's first appointment *

Remarks
Faculty: a class derived from Entry for a School Directory * faculty entry * inherits a first name, last name, and email address from Entry * additional fields are the faculty member's office, extension, * department, and year of initial aappointment to the school *
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 (Faculty.h), Implementation (Faculty.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 faculty member's first name *
lasta faculty member's last name *
eAddressa faculty member's email address *
rooma faculty member's office *
extthe telelphone number extension for the office *
departmentthe faculty member's [primary] department *
yrthe year of the faculty member's first appointment *

Member Function Documentation

◆ print()

std::ostream & Faculty::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: