Question: Final Programming Project: Contact Manager Create the project Create a project with the name: ContactManager Create a contact class ( Should be done from previous

Final Programming Project: Contact Manager
Create the project
Create a project with the name: ContactManager
Create a contact class (Should be done from previous project)
- Inherits from the Person Class (provided in previous project)
The Contact Class must have:
Fields:
lastName
firstName
streetAddress
city
state (2-letter abbreviation)
zipcode
For the above, aggregate the Address class from the previous project
Add also:
Date of Birth
Email Address
Constructors:
A "no arg" constructor
A Constructor that receives all fields listed above
Accessors and Mutators for each field.
A toString() method that prints the following (note commas and spaces):
- firstName, lastName, streetaddress, city, state, zip, date of birth, email
Note: This overrides that toString() method or the Person class.
Create a static utility class
Add a static class to the project called: "MyUtilities"
Methods in the utility class:
ZipCode Checker (from previous project)
- Receives a string
- Returns true or false based on the string matching a 5-digit zip code.
Password Checker
Returns true if password = "java", false if not.
Save To File
- receives two string parameters: The content of the file, The path of the file
Note: Management is concerned about security.
Access modifiers should allow anything in the package to access to your methods, but nothing outside the package.
Fields in a class should only be seen within the class.
Create a user interface
Print: "This application allows the user to keep track of contacts."
Print: "Enter your password, or enter X to exit:"
(The password is "java".)
The password will be checked by the Check method you created in the MyUtilities class.
- This should be handled gracefully. It should not abort he program. The only exit allowed will occur when the user gives up and enters an "X"(upper or lowercase).
Note: I recommend that your "static main" method should contain as little as possible. When approved, call a "doContacts" method where all other work will be done.
Create a doContact() method:
Print: "You can enter as many contacts as you like."
Begin Loop
Print: "Contact #"+ the number of the contact
Print: "Enter last name:"
(repeat for all fields)
When the user enters the zip code, check for correct zip format. Again, this should allow for repeated entries if needed.
All values will be loaded into a contact object.
Print: "You have entered:"
Print: Contact object toString()
Print: "Do you wish to add another? Enter Y to continue, N to stop."
Repeat until the user enters something other than Y (upper or lowercase).
When done, print the entire list the user has entered.
Save the contacts
Print: "Where do you want to save your contact list?"
Print: "Enter a file path and file name"
Save all entries to a file, using proper exception handling.
- Once again, allow for repeated efforts should an exception be thrown.
Print whatever exit message you like.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!