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

#include <Student.h>

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

Public Member Functions

 Student (std::string first, std::string last, std::string addr, int yr, std::string box)
 
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 student entry * inherits a first name, last name, and email address from Entry * additional fields are the studentr's year and PO Box *
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 (Student.h), Implementation (Student.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

◆ Student()

Student::Student ( std::string  first,
std::string  last,
std::string  addr,
int  yr,
std::string  box 
)

Remarks
Full-parameter constructor *
Parameters
firsta student's first name *
lasta student's last name *
eAddressa student's email address *
yearthe student's class or expected-graduation year *
boxthe student's campus post office box *

Member Function Documentation

◆ print()

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