1. Lecture 12 2. In this example, we have a class vector in which the data members have been put in the public part. class vector { public: float x; float y;…