diff options
| author | mo <mo.khan@gmail.com> | 2019-04-27 14:38:06 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-04-27 14:38:06 -0600 |
| commit | 3c26276309bcdf4af80ee2b1aed13f0318fe1ac9 (patch) | |
| tree | 722b3cf688a602e8d0ededc04e588859f6b9c2e5 | |
| parent | 7bbef979ba17aca184ab254508b74debc6a25769 (diff) | |
start readme for assignment 1.1
| -rw-r--r-- | assignments/1/README.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md new file mode 100644 index 0000000..13b2b57 --- /dev/null +++ b/assignments/1/README.md @@ -0,0 +1,24 @@ +Assignment 1 + +1. Create a class named AddressBook that has the following field names: + +* firstName +* middleName +* lastName +* homeAddress +* businessPhone +* homePhone +* cellphone +* skypeId +* facebookId +* personalWebSite + +Use appropriate data types to store the values for these fields in AddressBook objects. +Create appropriate get and set methods to retrieve and assign values to these names. +For example `getMiddleName(viveAddressBook)` should return the middle name of the person `Vive`. +Similarly, `vive.setPersonalWebsite(url)` should set the personal website of the person `Vive` to the specified URL object. +Using the get and set methods, create a comparison method `compareNames(name1, name2)` that compares the first, middle, and last names of strings name1 and name2. +Assume that name1 and name2 follow the following format: "FirstName M. LastName". + +Test your program for correct, partially correct (e.g., name string without the middleName), +and incorrect inputs (e.g., phone number containing special characters). |
