Explain the purpose of an instance variable.

What will be an ideal response?

A class provides an instance variable (or several instance variables) when each object
of the class must maintain information separately from all other objects of the class.
For example, a class called Account that represents a bank account provides an instance
variable to represent the balance of the account. Each Account object maintains
its own balance and does not know the balances of the bank’s other accounts.

Computer Science & Information Technology

You might also like to view...

Following Excel's order of operations, the result of the formula =2^3-6/2 is 1

Indicate whether the statement is true or false

Computer Science & Information Technology

What is the bit rate of a DS0?

A) 1.544 Mbps B) 64 Kbps C) 56 Kbps D) 1544 Kbps

Computer Science & Information Technology