Category : C Source Code
Archive   : ANSICPP.ZIP
Filename : ORG.H

 
Output of file : ORG.H contained in archive : ANSICPP.ZIP
// ex09016
// An organization's class structure
// ------------ org.h

#ifndef COMPANY_H
#define COMPANY_H

#include
#include

class OrgEntity {
char name[25];
int employee_count;
public:
OrgEntity(char *s, int ec)
{ strcpy(name, s); employee_count = ec; }
int number_employees() { return employee_count; }
char *org_name() { return name; }
virtual int office_party() = 0;
};

class Company : public OrgEntity {
public:
Company(char *s, int ec) : OrgEntity(s, ec) { }
virtual int office_party() { return 100; }
};

class Division : public Company {
public:
Division(char *s, int ec) : Company(s, ec) { }
virtual int office_party() { return 75; }
};

class Department : public Division {
public:
Department(char *s, int ec) : Division(s, ec) { }
virtual int office_party() { return 50; }
};

#endif


  3 Responses to “Category : C Source Code
Archive   : ANSICPP.ZIP
Filename : ORG.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/