Question: We introduce the basic types [PhoneNumberType, NameType). We also introduce an enumerated type Message which will assume values that correspond to success and error messages.

We introduce the basic types [PhoneNumberType, NameType). We also introduce an enumerated type Message which will assume values that correspond to success and error messages. Consider a system where you maintain your contacts. Let us consider an unbounded contacts list. Each person in your contacts list has a unique first and last name combination (for simplicity, let us call it 'name'), and is marked with one or possibly more phone numbers. People may not share phone numbers. 1.1) The declaration of the state of the system is defined by . . The set of phone numbers (call it numbers) that are recorded in contacts. A record of association between names and phone numbers, given by a correspondence (call it recorded). 1. Provide a diagram to visualize the state of the system. 2. Provide a formal definition for numbers. 3. Does recorded have to be captured by a function? What requirements would a function enforce? Explain in detail. 4. What is the domain and the codomain of recorded? 5. What type of function should recorded be (full or partial)? Explain in detail. 6. Will recorded be an injective, surjective, or bijective? Explain in detail. 7. Provide a formal definition for recorded. 1.2) Define a formal specification in Object-Z for class Contacts whose interface contains the following robust specifications: MakeNewContact: Adds a new person to Contacts with a single phone number. AddNumber: Adds an additional phone number for an existing contact. SearchEorNumber: Returns a collection of phone numbers for a given person.. Delete Number: Deletes an existing number. 1.3) Subclassify Contacts to introduce class Contacts2 that behaves exactly like Contacts, while introducing a robust operation to search for a person, given a phone number through operation Search For Person: We introduce the basic types [PhoneNumberType, NameType). We also introduce an enumerated type Message which will assume values that correspond to success and error messages. Consider a system where you maintain your contacts. Let us consider an unbounded contacts list. Each person in your contacts list has a unique first and last name combination (for simplicity, let us call it 'name'), and is marked with one or possibly more phone numbers. People may not share phone numbers. 1.1) The declaration of the state of the system is defined by . . The set of phone numbers (call it numbers) that are recorded in contacts. A record of association between names and phone numbers, given by a correspondence (call it recorded). 1. Provide a diagram to visualize the state of the system. 2. Provide a formal definition for numbers. 3. Does recorded have to be captured by a function? What requirements would a function enforce? Explain in detail. 4. What is the domain and the codomain of recorded? 5. What type of function should recorded be (full or partial)? Explain in detail. 6. Will recorded be an injective, surjective, or bijective? Explain in detail. 7. Provide a formal definition for recorded. 1.2) Define a formal specification in Object-Z for class Contacts whose interface contains the following robust specifications: MakeNewContact: Adds a new person to Contacts with a single phone number. AddNumber: Adds an additional phone number for an existing contact. SearchEorNumber: Returns a collection of phone numbers for a given person.. Delete Number: Deletes an existing number. 1.3) Subclassify Contacts to introduce class Contacts2 that behaves exactly like Contacts, while introducing a robust operation to search for a person, given a phone number through operation Search For Person
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
