Closed
Description
Task:
As stated in meeting notes 6, we should prepare class diagrams to understand how the implementation of the project will be.
Chapter
will be used in Course
. They will be helpful for lecturers in course management and in the badge system.
The class diagram for Chapter
shall show the methods, fields, and variables it will have. It also needs to be connected to other classes.
Expected requirements from Chapter
class:
- It shall store course content.
- It shall have a name.
- It shall have an ID.
- It shall store a badge if the lecturer decides to give one.
See achievements section 2.1.2.2.
Fields
Field | Type | Description |
---|---|---|
chapter_id | UID | ID of the chapter. |
chapter_name | string | Name of the chapter given by the lecturer |
chapter_badge | Badge | The badge that the learner achieves if s/he completes the course. |
chapter_content | List <Content:content_id> | List of contents created by the lecturer related to this chapter. |
Methods
Method | Args | Return | Description |
---|---|---|---|
addContent | text, media | content_id | Creates an instance of content class, adds it into chapter_content list and returns content_id. In the content that is created media or text will be stored. |
modifyContent | content_id, text, media | bool | Modifies the related content with the given arguments. |
deleteContent | content_id | bool | Deletes the related content. |
addBadge | title : string, description : string | badge_id | Creates and instance of Badge class and sets its title and description. |
deleteBadge | badge_id : UID | bool | Deletes the badge with the given badge_id. |
modifyBadge | badge_id : UID, title : string, description : string | bool | Modifies the related badge |
Required Tools:
Deadline:
5 April 2022, 23.59