This project manages a pharmacy's medication inventory using Java Maps. It allows adding, searching, deleting, and counting medications.
Medication Class: Represents a medication with attributes such as name, price, and availability.
Pharmacy Class: Uses a HashMap to store medications, allowing operations like:
- Adding new medications
- Searching for medications by name
- Deleting medications
- Counting total medications in stock
Main Class: Demonstrates the operations on the pharmacy by: - Adding a new medication
- Finding a medication by its name
- Deleting a medication
- Displaying all medications and their details
- Java Map: A HashMap is used to store medications with names as keys.
- CRUD Operations: Create, Read, Update, and Delete operations on medication records.
- Main.java: Executes and demonstrates the functionality of the Pharmacy class.
- Medication.java: Defines the structure of a medication.
- Pharmacy.java: Manages the inventory using a HashMap.
- Java 17+
- IDE (e.g., IntelliJ IDEA)