I'm writing an application launcher program. The launcher will launch applications based on the files found in the working directory.
(Example: a folder containing files with the extensions .docx, .xlsx, .sln, and .txt, would give the user the option to launch Word, Excel, Visual Studio and Notepad loading any of those files specified.)

I need:
1. A Base class for my application launcher.
2. Derived classes for the following applications.
a. Microsoft Word (.docx extension)
b. Microsoft Excel (.xlsx extension)
c. Visual Studio (.sln extension)
d. 7-zip files (.7z extension)
e. Command Shell (CMD.EXE)
3. A class to manage all your launcher objects.
4. A main to prompt the user to choose which application [with file] to launch.
5. // Uses Boost filesystem version 3.

Would someone care to show me how to start one of these header files with one of the derived classes.
Thanx

Well, this is basically a project to better help us understand Inheritance. I understand it to a certain point, but to incorporate this into inheritance doesn't make a lot of sense.

I started with my Base class and the Word class, two separate .h files.

#ifndef __BASE_H__
#define __BASE_H__
#include <string>
#include <iostream>
using namespace std;

class Base
{
protected:
    string program_;
    Base(string pro):program_(pro) {}
public:
    virtual void execute() = 0 {}

};

#endif



#ifndef __WORD_H__
#define __WORD_H__
#include "Base.h"
using namespace std;

class Word : public Base
{
private:
    string file_;
public:
    Word(string f):file_(f) {}

};

#endif

Edited 3 Years Ago by mike_2000_17: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.