Question: Here is a specification for a class MyPhonebook. Use this for the problem that follow. The operations are all public. Draw a State Chart Diagram
Here is a specification for a class MyPhonebook. Use this for the problem that follow. The operations are all public.
Draw a State Chart Diagram describing the interaction protocol of MyPhoneBook
Here is a specification for a class MyPhonebook. Use this for the problems that follow. The operations are all public.
MyPhoneBook; constructor
postcondition: getSize
~MyPhoneBook; destructor
void add string name, unsigned number;
precondition: name AND name and number
postcondition: If lookupNumbername AND lookupNamenumber then
the pair name number are added to the phonebook
AND the existing phonebook entries are unchanged AND getSize getSize
void remove string name;
postcondition: If lookupNumbername then
the pair name lookupNumbername is removed from the phonebook
AND the remaining phonebook entries are unchanged AND getSize getSize
void remove unsigned number;
postcondition: the phonebook entries are unchanged AND getSize getSize
unsigned lookupNumber string name;
postcondition: If name exists in the phonebook, then return its associated number. The
phonebook entries are unchanged AND getSize getSize
string lookupName unsigned number;
postcondition: Return The phonebook entries are unchanged AND getSize getSize
int getSize;
postcondition: getSize getSize AND the phonebook entries are unchanged
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
