हिंदी

Given below is a real-life case. Class name: City Name two objects of this class. Also name two data and two methods of this class.

Advertisements
Advertisements

प्रश्न

Given below is a real-life case.

Class name: City

Name two objects of this class. Also name two data and two methods of this class.

अति संक्षिप्त उत्तर
Advertisements

उत्तर

Two objects of this class are:

  1. Delhi
  2. Mumbai

Two data members of this class are:

  1. cityName
  2. population

Two methods of this class are:

  1. displayDetails()
  2. showPopulation()
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 2: Class as the Basis of all Computation - Exercises [पृष्ठ ६५]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 2 Class as the Basis of all Computation
Exercises | Q 4. (iv) | पृष्ठ ६५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×