Category : abstract

In student.h file class Student { protected: string Name; int Stu_num; public: virtual void print() = 0; // constructor… } class Grad_Student: public Student { private: string Lab; public: void print(); // constructor… } class Undergrad_Student { private: string Major; public: void print(); // constructor… } in student.cpp file bool operator == (const Student& x, ..

Read more

I am writing an Interface for Matrix class in C++ So all functions need to be virtual Now in the below code I have defined a virtual function virtual Matrix add(Matrix A, Matrix B) const = 0; The problem I see is the class Matrix is not defined. So I am confused should I define ..

Read more

I’m trying to define an abstract interface class AbstractSystemInterface for a dynamical systems problem. The dynamical system has an n dimensional state vector and an ‘m’ dimensional input vector whose lengths are known(at compile time) by the developer who implements my interface. The developer in their derived class also implements functions on actually populating the ..

Read more