A Java-based Membership Registration and Search System for a hypothetical organization that manages two types of members, Professionals and Amateurs.
This program uses the Java GUI with JOptionPane dialogs. It allows for users to register new members, search for existing ones by Membership ID, and handles hada using ArrayLists. This system enforces strict input validation for every input field.
Dual Member Types:
Professional: Includes organization details (name, contact person, website).
Amaeture: Includes personal details (first/last name, date of birth).
Registration System:
Register Professionals or Amateurs separately.
Automatic calculation of memberhsip fees based on type (Life / Regular) and category.
Search Functionality:
Search Membership ID (Format: 10 digets + A or P).
Membership Type: Life or Regular
Names: Letters Only
City: Letters and Spaces Only
State: Exactly 2 letters.
Phone Exactly 10 digits.
Date of Birth: Exactly 8 digits (MMDDYYYY).
Website: Must start with "www." and end with ".com".
Data Types:
Uses two (2) ArrayLists (for Professional and Amateur) to store during runtime.
User-Friendly Menus
Inheritance:
Professional and Amateur extends the Member superclass.
Encapsulation:
Private fields with getter and setter methods.
Polymorphism:
Subclasses override displayReport() and add their own fields.
ArrayList:
Enables a dynamic storage for members.
Method Overriding:
Subclasses have their own validation and input methods.
Composition:
Member class contains common data.
Subclasses add specific data.
Input Validation:
Uses loops and custom validation methods.
The program starts with the main menu.
The user chooses either Professional or Amateur.
Input is collected from the user:
Fields from member: ID, Type, City, State, Phone, Email.
Additional fields in Professional: Organization, Contact names, Website.
Additioanl fields in Amateur: First and Last name, Date of Birth.
Fee Calculation:
Changes between the different fee types (Professional Life, Professional Regular, Amateur Life, Amateur Regular).
Data Stored in the respecitve ArrayList.
Searching:
Users enter a valid MembershipID (e.g., 1234567890A).
Program searches through the appropriate list.
If the MembershipID is found, it will display the report.
The Program will continue to run until the user quits the program.
This program strengthened my understanding of Object-Orineted Programming (OOP) concepts in Java. By creating a class hierarchy with a Member superclass and Professional and Amateur subclasses, I gained experience with inheritance, encapsulation, and polymorphism. I learned how to reuse code by placing common attributes and methods in the parent class while extending functionality in the child classes.
I also developed strong skills in data validation. Implementing multiple validation methods (for each data type) taught me the importance of robust input validation to prevent errors and ensure data integrity.
Working with ArrayLists to store and search through member records helped me understand dynamic data structures and linear search algorithms. Additionally, buiding a menu-driven program using JOptionPane improved my ability to create user-friendly interfaces and organize large programs usign multiple methods and switch statements.