# Summer: Assignment 4 - Debugging Lab
## Your task
You are a software engineer at Apple. Your main focus is creating a Contacts app to work along with the Phone app.
The Contacts app needs the following objects:
* Contact Object
* Contact Group Object
Use your knowledge of creating and manipulating variables, lists, and objects to complete the steps below.
---
## Steps
## Part 1: Contact Objects
Contact objects are used to store a user's contacts. Contact objects have the following keys:
* `name` (string)
* `number` (number)
* `email` (string)
* `birthday` (string)
* `toDo` (array of strings)
1. Type `console.log("PART 1\n")`
2. Create 6 variables with the following name: `self`, `contact1`, `contact2`, `contact3`, `contact4`, `contact5`. Each variable is for an object that you will create in the following steps. Read carefully to assign the correct objects to the correct variables.
---
2. Inside the `self` variable create a Contact object based on the following information. The user's `name` is `Marlon Jones`. The user's `number` is `3479876798`. The user's `email` is `marlonjones97@gmail.com`. The user's `birhtday` is `March 5, 1997`. The user has the following items on their `toDo` list:
1. Buy groceries
2. Renew passport
---
3. Inside the `contact1` variable create a Contact object based on the following information. The `contact1` object is for Marlon Jones' sister. The sister's `name` is `Erica Jones`. Erica's `number` is `7182345678`. Erica's `email` is `ericajones97@gmail.com`. Erica's `birhtday` is `March 10, 1987`. Marlon has the following items on the `toDo` list for Erica:
1. Buy flowers
2. Call her to check in
---
4. Inside the `contact2` variable create a Contact object based on the following information. The `contact2` object is for Marlon Jones' brother. The brother's `name` is `Mark Jones`. Mark's `number` is `7188091345`. Mark's `email` is `markjones97@gmail.com`. Mark's `birhtday` is `April 8, 1985`. Marlon has the following items on the `toDo` list for Mark:
1. Invite to a football game
---
5. Inside the `contact3` variable create a Contact object based on the following information. The `contact3` object is for Marlon Jones' coworker. The coworker's `name` is `Earl Eustice`. Earl's `number` is `2128091345`. Earl's `email` is `earleustice97@work.com`. Earl's `birhtday` is `June 8, 1965`. Marlon has the following items on the `toDo` list for Earl:
1. Reply to email
2. Send a copy of the Bloomberg reports by Friday
---
6. Inside the `contact4` variable create a Contact object based on the following information. The `contact4` object is for Marlon Jones' coworker. The coworker's `name` is `Patricia Davis`. Patricia's `number` is `7186789866`. Patricia's `email` is `patriciadavis67@work.com`. Patricia's `birhtday` is `February 8, 1990`. Marlon has the following items on the `toDo` list for Patricia:
1. Request a copy of the JP Morgan project files
---
7. Inside the `contact5` variable create a Contact object based on the following information. The `contact5` object is for Marlon Jones' friend. The friend's `name` is `Paul Jacobs`. Paul's `number` is `3216789866`. Paul's `email` is `pauljacobs@social.com`. Paul's `birhtday` is `February 8, 1994`. Marlon has the following items on the `toDo` list for Paul:
1. Make plans to get drinks
2. Make plans to hangout
---
8. Type `console.log("Contact Objects\n")`
---
9. Type `console.log(self)`
---
10. Type `console.log(contact1)`
---
11. Type `console.log(contact2)`
---
12. Type `console.log(contact3)`
---
13. Type `console.log(contact4)`
---
14. Type `console.log(contact5)`
---
## Part 2: Contact Group Objects
Contact group objects have the following keys:
* `groupName` (string)
* `groupMembers` (array of Contact objects)
---
1. Type `console.log("\n\nPART 2\n")`
---
2. Create 4 variables with the following names: `family`, `work`, `friends`, `allContacts`
---
2. The `allContacts` object is for ALL of Marlon Jones' contacts. The name of the group is `All Contacts`. The `groupMembers` key should be an empty array when the object is first created.
---
3. The `work` object is for ALL of Marlon Jones' work contacts. The name of the group is `Work Contacts`. The `groupMembers` key should be an empty array when the object is first created.
---
4. The `family` object is for ALL of Marlon Jones' family members. The name of the group is `Family`. The `groupMembers` key should be an empty array when the object is first created.
---
5. The `friends` object is for ALL of Marlon Jones' friends. The name of the group is `Friends`. The `groupMembers` key should be an empty array when the object is first created.
---
6. Use the `push()` method to add ALL of Marlon's contacts to the `allContacts` contact group object.
---
7. Use the `push()` method to add the appropriate contacts to the `work` contact group object.
---
8. Use the `push()` method to add the appropriate contacts to the `family` contact group object.
---
9. Use the `push()` method to add the appropriate contacts to the `friends` contact group object.
---
10. Type `console.log("Contact Group Objects\n")`
---
9. Type `console.log(allContacts)`
---
10. Type `console.log(family)`
---
11. Type `console.log(work)`
---
12. Type `console.log(friends)`
---
## Part 3: Output Contacts from Friends Group
---
1. Type `console.log("\n\nPART 3")`
---
2. Type `console.log("\nFRIENDS Contacts\n\n")`
---
3. Use `list indexing` and `object dot notation` to output the name, email, and phone number of ALL the contacts in the `friends` contact list
---
###### tags: `AP CS Principles` `CSH`