Java – Are Car objects and Dog objects used in real life programs

javaobject-oriented

While learning about OOP, I have noticed that a lot of the tutorials give examples of objects such as Car objects and Dog objects, but I don't know if these kind of objects are used in real life programs.

I think they may be used in a game for example, so if a game have cars and dogs in it, it would use Car objects and Dog objects, but other than games, are these kind of objects used in real life programs?

Best Answer

Yes. Software is used in all sorts of fields of endevour. People who work with dogs or with cars may well use software to help them manage the information they need for their jobs, and in some cases those software programs will include Car and Dog objects.

For instance software to manage a car repair shop, or a vetinary surgery or kennel, or to design road systems.

Of course in many of these business cases the objects do not attempt to simulate the dog or the car, but to model how it actually exists in the world and how it relates to the organisation running the software.