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

What would your application launcher do that MSWindows doesn't already do?

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

hey, i like the idea of this for learning inheritance. do you mind sending me the code you used? email: pickle_d_91@hotmail.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.