A simple Java project built using Object-Oriented Programming (OOP) principles that checks real-time stock prices using an API and tells whether your target price has been reached or not.
- Fetches live stock information from an API
- Checks if the current stock price meets your target price
- Displays a clear message when the target is achieved
- Clean OOP-based code structure with classes and methods
- Easy to extend for multiple stocks
- Encapsulation: Stock details and logic are wrapped inside dedicated classes
- Abstraction: API fetching and comparison logic are hidden behind simple methods
- Inheritance (Optional): Can be extended for advanced stock tracking
- Polymorphism: Allows flexible methods for different stock APIs or price checks
- Java 17+
- HTTP API (e.g., Alpha Vantage / Finnhub / any stock API)
- JSON Parsing (via built-in or external libraries like Gson)
- User sets a target price for a stock
- The program fetches the current price using an API
- It compares current vs. target
- Displays output like: