What are the core principles of object-oriented programming, and how do you implement them in languages like Java or C?