Computer Science, asked by nishatsarkarneera909, 6 months ago

1. b) Suppose you want to create a class with your last name which consist your id as name instance variable. Write all possible methods including constructor and destructor function for your class and explain what is the main reason to use constructor and destructor funtion in your class.​

Answers

Answered by kannmeghna
0

Answer:

For example, suppose you want to create a number of Bicycle objects and assign ... add an instance variable for the object ID private int id; // add a class variable for the ... Class variables are referenced by the class name itself, as in ... Static methods, which have the static modifier in their declarations, should be invoked ...

Similar questions