DataType

DataType - fCredits(credits) {fName = name;} // Argument...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef _DataType_h #define _DataType_h #include <string> using namespace std; class CDataType { public: CDataType() : fName(""), fGPA(0.0), fIncome(0), fTest(0), fCredits(0) {} // Default constructor virtual ~CDataType() {} // Virtual destructor CDataType(const CDataType& data) : fGPA(data.fGPA), fIncome(data.fIncome), fTest(data.fTest), fCredits(data.fCredits) {fName = data.fName;} // Copy constructor CDataType(const string name, const float GPA, const long income, const short test, const short credits) : fGPA(GPA), fIncome(income), fTest(test),
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fCredits(credits) {fName = name;} // Argument constructor CDataType& operator=(const CDataType& data); // Overloaded assignment operator bool operator==(const CDataType& data); // Overloaded equality operator bool operator<(const CDataType& data); // Overloaded less than operator void Run (); inline string GetName() {return fName;} inline short GetCredits() {return fCredits;} private: string fName; float fGPA; long fIncome; short fTest; short fCredits; }; #endif...
View Full Document

This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.

Ask a homework question - tutors are online