Your duty is to model a phoneBook . The first step is to model a Person entry . Follow those steps :
- create a struct Person
- Person has the following properties :
-
- firstName : String
-
- middleName : String
-
- lastName : String
-
- mobileNumber : String
-
- age : Int
-
- address : String
Now , we want to extend the functionality of this new struct. Use extension to add the following method :
- func describePerson ()
- This new function, should print a description of the person . Example : "person: Dana Salim AlZain. Her mobile phone number is: +966 564 93849. She is 27 years old. Dana adress is 22nd street, Building 20846"
- Create a person
- call describePerson()