Consider the following UML diagram of a class :
MessageBoard
Need to modify this so that the design adheres to single responsibility principle.
So we could break this class into as many classes we want.
The context for this MessageBoard class is :
This program runs the back end of a website like Piazza.
Some of the messages are posted by regular users (students),
displaying the name of the author and time that is was posted.
Other messages are posted by admin users (instructors and TAs) and
contain the same information as well as the number of
times the message has been edited by the original author.
When a message is posted, it appears with tags afterwards.
Tags are strings that start with an @ sign. They are chosen by author of the message.
The system that keeps track of each message, its tags, who posted it,
and links together messages that are part of the same conversation is
called the Message Board. A user can request to only see posts with a
particular tag. For example, a user can search all messages that discuss
design patterns by searching for @designPatterns.
Aucun commentaire:
Enregistrer un commentaire