Please refer to General Assignment requirements document for the additional requirements Please note that numbers in the square brackets before each requirement represent the points that are awarded if the requirement is fully implemented. In this assignment you will create an address book. The user of the application will be able to add a contact with the following information about the contact: 1. First name 2. Last name 3. Address 4. Phone number To implement this, you need to do the following: The Contact class You will implement the Contact class in Visual Studio. A short description of the class members is given below. This class must have only the following members: Properties: You must use auto-implemented properties. [1] FirstName – string that represents the first name of the contact [1] LastName - string that represents the last name of the contact [1] Address - string that represents the address of the contact [1] Phone – unsigned long integer that represent a phone number of the contact. Constructor: [2] Public constructor that requires first name, last name, address, and phone number as arguments. Methods: [3] ToString method that returns the string representation in the following format: LastName, FirstName Address Phone For instance: Dow, John 35 Elm St, Toronto, ON, M3M 2M2 4161234567 The AddressBook Class You will implement the AddressBook class in Visual Studio. A short description of the class members is given below. This class must have only the following members: Filed: [3]contacts – this private read only field is a collection of Contact objects Properties: [1] Name – the read only property represents name of the address book. Constructor: [3] Public constructor that accepts the name of the address book as a parameter. Methods: [4] AddContact – this method returns bool value true if a contact is successfully added and false otherwise. The parameters for this method are, first name, last name, address and phone number. The contact can be successfully added to an address book only if there is no contact in the address book that has the same phone number. [3] AddContact – this method returns bool value that is true if a contact is successfully added and false otherwise. The parameter of this method is a Contact object. The contact can be successfully added to an address book only if there is no contact in the address book that has the same phone number. [3] FindContact – this method returns the Contact object with the telephone number provided as a parameter to the method. If there is no contact with that phone number the method returns null. [5] FindContact – this method returns the collection of Contact objects with the first and last name that is provided as the parameters to the method. If there are no contacts found the collection will be empty. [3] ToSting – this method returns sting with the name of the address book and list of all contacts in the book. Testing In your main method do only the following: a. [1] Create 4 Contact objects with following information: # First Name Last Name Address Phone 1 John Dow 35 Elm St, Toronto, ON, M3M 2M2 4161234567 2 Ann Brown 12 King St, London, ON, L3K1Q2 5191234567 3 Lee Wong 1 John St, Markham, ON, L1L 2R4 9051234567 4 Bob Smith 1 Queen St, Toronto, ON, M5W 6J9 4161234567 b. [1] Create two address books named “Friends” and “Work” c. [1] Display the content of both address books. d. [1] Add contacts 1, 2, and 3 to “Friends” address book e. [1] Add contacts 1, 3, and 4 to “Work” address book. Make sure that you output appropriate message about the success of the operation. f. [1] Display the content of both address books. g. [1] Add the following contact to the “Work” address book: John Dow, 14 Front St, Toronto, M6M 4U4, 4167654321 h. [1] Look for the contact with phone number 4161234567 in the “Friends” address book and display the result i. [1] Look for the contact with phone 4161234568 in the “Friends” address book and display result j. [1] Look for the contacts with the first and the last name: John Dow in the “Work” address book and display the result. C# using visual studio

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter6: Managing Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 6RA
icon
Related questions
Question

Please refer to General Assignment requirements document for the additional requirements
Please note that numbers in the square brackets before each requirement represent the points that are awarded if the requirement is fully implemented.
In this assignment you will create an address book. The user of the application will be able to add a contact with the following information about the contact:
1. First name
2. Last name
3. Address
4. Phone number
To implement this, you need to do the following:
The Contact class
You will implement the Contact class in Visual Studio. A short description of the class members is given below. This class must have only the following members:
Properties:
You must use auto-implemented properties.
[1] FirstName – string that represents the first name of the contact
[1] LastName - string that represents the last name of the contact
[1] Address - string that represents the address of the contact
[1] Phone – unsigned long integer that represent a phone number of the contact.
Constructor:
[2] Public constructor that requires first name, last name, address, and phone number as arguments.
Methods:
[3] ToString method that returns the string representation in the following format:
LastName, FirstName
Address
Phone

For instance:
Dow, John
35 Elm St, Toronto, ON, M3M 2M2
4161234567
The AddressBook Class
You will implement the AddressBook class in Visual Studio. A short description of the class members is given below. This class must have only the following members:
Filed:
[3]contacts – this private read only field is a collection of Contact objects
Properties:
[1] Name – the read only property represents name of the address book.
Constructor:
[3] Public constructor that accepts the name of the address book as a parameter.
Methods:
[4] AddContact – this method returns bool value true if a contact is successfully added and false otherwise. The parameters for this method are, first name, last name, address and phone number. The contact can be successfully added to an address book only if there is no contact in the address book that has the same phone number.
[3] AddContact – this method returns bool value that is true if a contact is successfully added and false otherwise. The parameter of this method is a Contact object. The contact can be successfully added to an address book only if there is no contact in the address book that has the same phone number.
[3] FindContact – this method returns the Contact object with the telephone number provided as a parameter to the method. If there is no contact with that phone number the method returns null.
[5] FindContact – this method returns the collection of Contact objects with the first and last name that is provided as the parameters to the method. If there are no contacts found the collection will be empty.
[3] ToSting – this method returns sting with the name of the address book and list of all contacts in the book.
Testing
In your main method do only the following:
a. [1] Create 4 Contact objects with following information:
# First Name Last Name Address Phone
1 John Dow 35 Elm St, Toronto, ON, M3M 2M2 4161234567
2 Ann Brown 12 King St, London, ON, L3K1Q2 5191234567
3 Lee Wong 1 John St, Markham, ON, L1L 2R4 9051234567
4 Bob Smith 1 Queen St, Toronto, ON, M5W 6J9 4161234567
b. [1] Create two address books named “Friends” and “Work”
c. [1] Display the content of both address books.
d. [1] Add contacts 1, 2, and 3 to “Friends” address book
e. [1] Add contacts 1, 3, and 4 to “Work” address book. Make sure that you output appropriate message about the success of the operation.
f. [1] Display the content of both address books.
g. [1] Add the following contact to the “Work” address book: John Dow, 14 Front St, Toronto, M6M 4U4, 4167654321
h. [1] Look for the contact with phone number 4161234567 in the “Friends” address book and display the result
i. [1] Look for the contact with phone 4161234568 in the “Friends” address book and display result
j. [1] Look for the contacts with the first and the last name: John Dow in the “Work” address book and display the result.

C# using visual studio 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning