Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

=+3. Who is the audience?

Answered: 1 week ago