- The essential basics of object-oriented programming: encapsulation, inheritance and polymorphism.
- Applying regular expressions
- Serialization basics
This program allows the user to create and save contacts (like we do on a phone), and search for organizations or people by name. Only two categories of contacts are represented: person and organization, with each category having different fields to fill out.
For a person, the required fields are: name, surname, birthdate, gender, number.
For an organization, the required fields are: name, address, number
A number is considered to be of a correct format if it matches the following pattern:
- The phone number should be split into groups using a space or dash. One group is also possible.
- Before the first group, there may or may not be a plus symbol.
- The first group or the second group can be wrapped in parentheses, but there should be no more than one group that is wrapped in parentheses. There may also be no groups wrapped in parentheses.
- A group can contain numbers, uppercase, and lowercase English letters. A group should be at least 2 symbols in length. But the first group may be only one symbol in length.
NOTE: for now, the program doesn't check for correct user input, so exceptions for incorrect input are expected.
To learn more about this project, please visit HyperSkill Website - Contacts (Java).
This project's difficulty has been labelled as Hard where this is how HyperSkill describes each of its four available difficulty levels:
- Easy Projects - if you're just starting
- Medium Projects - to build upon the basics
- Hard Projects - to practice all the basic concepts and learn new ones
- Challenging Projects - to perfect your knowledge with challenging tasks
This repository contains
contacts package
- Contains the contacts.Main java class that contains the main method to run the project
- Contains the contacts.Contact java class that is used to store the contacts provided by the user
- Contains the contacts.SerializationUtils java class that allows for serialization of contacts information
Project was built using java version 8 update 381
Download the contacts repository to your machine. Create a new project in IntelliJ IDEA, then move the downloaded contacts repository to the src folder and run the contacts.Main java class.