InterviewSolution
Saved Bookmarks
| 1. |
Object-Oriented Programming |
Answer»
// Attribute string name; int population; public: // Method void increase_population() { population++; } }; In C++, a class is the fundamental building block of Object-Oriented programming. A class typically consists of:
An object is an instance of a class that encapsulates its data and member functions. The above code creates an instance of the class City named Mumbai. |
|