loading...

CS304 VU Assignment No. 2 Spring 2012 Solution

You are required to provide a practical prototype in c++ for the following class diagram. Mean you will have to provide the solution in the form of classes in c++.

Also note that you don’t have to give actual implementation in c++ but simple stereotype (sketch) in the form of c++ code mentioning class names their parameters and functions with access specifiers.

You also have to show the relationship (inheritance, association, aggregation, composition) between classes in proper c++ syntax with comments.

Solution:
#include<iostream.h>
#include<conio.h>

   class Lesson{


    int ID;
    topic * title;
    int NoOfLessons;

    public:

    void add();
    void remove();
    bool select();
    void search();
    void View();
    void print();
    void download();
    };


class course{

   char * code;
   topic  title;
   char * courseName;
   int duration;
   Lesson NoOfLessons;

    public:


    void add();
    bool select();
    void View();
    void read();

    };


class StudyProgram{

    char * Code;
    char * title;
    char * ProgramName;
    course duration;

    public:
    bool select();
    char * ViewCourseList;
    };

class topic{

    int ID;
    char * title;

    public:

    void add();
    void remove();
    bool select();
    void search();
    void View();
    void print();
    void download();
    };

 

DOWNLOAD SOLUTION HERE
loading...