Assignment:

In Assignment No.1 we developed Object Oriented Model for three modules of Learning Management System now you have to give its practical prototype in c++ mean you have to the solution of your first assignment and have to implement it 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 between classes in the form of inheritance mentioning the name of class/classes from which they have been derived in proper c++ syntax.


For example a part of your code may look like,

class Student{
char name[50];
char id[10];

public:
void TakeClass();

}

class GraduateStudent : public Student
{

Attributes and behavior of graduate student…..

}


You will write such code for your learning management system.

Dani AI

Generated

The task calls for C++ "sketch" prototypes (class names, member types, access specifiers, and inheritance) rather than full implementations. posted the assignment; suggested a software-dev forum and correctly flagged the homework-policy issue. Below is concise, instructor-safe guidance plus a header-style example that shows structure without giving a turn-key solution.

Keep sketches focused and modern: list classes with attributes and method prototypes only, keep data members private, and expose behavior via public functions. Prefer std::string and STL containers like std::vector over C-style arrays; represent multiplicity with containers and associations with pointers/references. Use composition (member objects) for has-a relationships and public inheritance only for true is-a cases. Mark polymorphic bases abstract and give them a virtual destructor (destructors). Indicate ownership with smart pointers in the sketch (unique_ptr), and prefer forward declarations in headers so sketches remain compact. No method bodies are necessary for the assignment—signatures and relationships are the deliverable.

#include <string>
#include <vector>
#include <memory>

class Account {
protected:
    std::string id;
public:
    virtual ~Account() = default;
    virtual void authenticate(const std::string& password) = 0;
};

class Learner : public Account {
private:
    std::vector<int> enrolledCourseIds;
public:
    void enroll(int courseId);
    void viewProgress() const;
};

class Course {
private:
    int courseId;
    std::string title;
    std::vector<std::shared_ptr<Account>> participants;
public:
    void addParticipant(std::shared_ptr<Account> p);
    void scheduleSession(const std::string& datetime);
};

This template demonstrates how to show inheritance and associations while staying within the forum rules noted by ; moving implementation details to .cpp files keeps the sketch concise, as implied about forum scope.

Recommended Answers

All 2 Replies

You will probably get better help in a software dev forum.

No, they really won't, because they just posted their homework assignment without demonstrating any effort whatsoever - which runs afoul of the announcement in all of the dev forums: http://www.daniweb.com/forums/announcement8-2.html

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.