100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS Oct Nov Discussion R104,01
Add to cart

Exam (elaborations)

COS Oct Nov Discussion

 0 purchase

COS Oct Nov Discussion

Preview 2 out of 8  pages

  • June 3, 2022
  • 8
  • 2020/2021
  • Exam (elaborations)
  • Answers
All documents for this subject (6)
avatar-seller
Succeesspro
lOMoARcPSD|14447089




COS3711 2021 OCT NOV DISCUSSION




COS3711 2021 Oct Nov Discussion


Advanced Programming (University of South Africa)




StuDocu is not sponsored or endorsed by any college or university
Downloaded by Sally Wink ()

, lOMoARcPSD|14447089




All businesses need to manage their communication, and the simplified scenario used in this
examination is based on communication strategies. The idea is that a user can select a type of
communication channel and have a message sent out on that channel at some specific point
in time. The application itself allows the user to set up the required options and just the strategy
and message will be displayed for the purposes of a brief history of messages sent – See Figure
1.




Figure 1. App window.

Question 1

Apply the strategy design pattern to the scenario above that would also adhere to the following
requirements.
1. There are currently 3 basic strategies/channels for communication: Signal, SMS, and
WhatsApp. Your design should include a strategy for each channel.
2. All that is needed to create one of these is a type name.
3. Once an appropriate type has been created, a setUp() function would be used to populate
object instance data members, and the communicate() function used to process the
required communication.

A CommunicationStrategy UML class diagram has already been drawn up – see Figure 2.
Note that you may abbreviate this class name to ComStrat in your answers.




Figure 2. UML class diagram

1.1 Considering the scenario given and design decisions listed above, draw a UML class
diagram for the strategy pattern. You should include the necessary classes, class
attributes, class constructors and operations, and class relationships to make it clear you
understand how data will be managed and passed between classes. Label all



Downloaded by Sally Wink ()

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Succeesspro. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R104,01. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

69052 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 15 years now

Start selling
R104,01
  • (0)
Add to cart
Added