Define class, module and access specifiers.

Showing Answers 1 - 7 of 7 Answers

Swapna Gentyala

  • Oct 30th, 2006
 

Class: A class is a template for objects. It is static. The attributes of a class doesn't change before, during, or after the execution of the class. Module: A module is a collection of Classes, functions, and procedures. A module cann't be istantiated. But a class can have instances of it.Access Specifiers: Public, Private and Friend are the Access Specifiers for Classes. Whether we can access a class or not depends on the Access Specifier. Public class can be accessed from anywhere. Private can be accessed only within the function.

Class is a type where you can create your own type. Just as int data type in .Net which takes only integer values and having default API's such as toString().
 Similarly, you can create your own type having API's which do some operation for your type.

Module: Its same as Namespace.

Access Specifier: Assign the scope for variable or method.
Below are scrope in C#.Net:
private, protected, internal, protected internal,public

  Was this answer useful?  Yes

Class is a reserved data type which is used to encasulate similar type of methods and objects.  For eg Cars is a class which holds Maruti 800 as object in it and tyres, seats etc are its methods or functions.  (Methods and Functions are one all the same thing)

Access Modifiers are properties to defined to access data types.Its defined for security purpose.  Public , private, protected, private protected are access modifiers defined in different languages.

Module is a code that you write or hold for performing certain tasks.Every code you write is a module.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions