Question: Ruby Programming design using scenario diagrams. Here are four scenarios, where we assume throughout that input is well-formed: 1. a_phone_book responds to a add(name, label,

Ruby Programming design using scenario diagrams.

Here are four scenarios, where we assume throughout that input is well-formed:

1. a_phone_book responds to a add(name, label, phone_number) message where it does not yet contain a name entry.

2. a_phone_book responds to a add(name,label, phone_number) message where it already contains a name entry and this entry does not contain a label contact.

3. a_phone_book responds to a find_contact(name, label) message where it contains a name entry that contains a label contact.

4. a_phone_book responds to a delete(name, label) where it contains a name entry whose sole contact is a label contact (i.e., the entry should be deleted from this phone book).

Draw a sequence diagram for each of these scenarios (four diagrams in total).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!