Generate a unique identification number for each object


Keeping in mind all object-oriented programming best practices, create a class for a Desk, with the following specifications:

1) Specify two data members

2) Default Constructor

3) Overloaded Constructor which takes both data member values as input.

4) Generate a unique identification number for each object instantiated from this class. Use a static data member to keep track of the identification number last assigned to an object so that duplications will not occur. Code the necessary portion of the class definition so as to support this requirement.

5) Show a statement which instantiates an object of this class using the overloaded constructor.

You do not need to provide any accessor/mutator methods or other methods.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Generate a unique identification number for each object
Reference No:- TGS0661672

Expected delivery within 24 Hours