Computer Science, asked by Fhdjfjfj6071, 2 months ago

Write a program that defines a class with a data member to holds a "serial number" for each object created from the class. That is, the first object created will be numbered 1, the second 2, and so on. To do this, you’ll need another data member that records a count of how many objects have been created so far. (This member should apply to the class as a whole; not to individual objects. What keyword specifies this?) Then, as each object is created, its constructor can examine this count member variable to determine the appropriate serial number for the new object. Add a member function that permits an object to report its own serial number. Then write a main() program that creates three objects and queries each about its serial number. They should respond I am object number 2, and so on.

Answers

Answered by mehtanarendra1951
0

Answer:

Self-induction of coil is the property by virtue of which it tends to maintain the magnetic flux linked with it and opposes any change in the flux by inducingcurrent in it. ... That is why self-induction is called the inertia of electricity

Similar questions