The conversation between human and AI assistant.
What are the 4 pillars of OOPs?
That was helpful. Can you give me an example of a program that utilizes all 4 pillars?
One example could be a program that has a parent class called "Vehicle" that contains basic properties and behaviors such as "number of wheels" and "drive". The program could also have child classes that inherit from "Vehicle" such as "Car" and "Motorcycle" which would have their own unique properties and behaviors. Encapsulation could be used to hide the specific workings of each vehicle class. Polymorphism could be demonstrated by having the program accept any type of vehicle object as input and still be able to perform the same actions. And Abstraction could be used to only display the essential information to the user, such as the type of vehicle and its current speed.