Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

difference between class and module

This is a discussion on difference between class and module within the VB.NET forums, part of the Software Development category; difference between class and module?...

Go Back   Geeks Talk > Software Development > VB.NET
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

VB.NET Visualbasic.NET

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-22-2009
Junior Member
 
Join Date: Jun 2009
Location: HYDERABAD
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
avismca is on a distinguished road
difference between class and module

difference between class and module?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-23-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 984
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
Re: difference between class and module

Hi,

Both class and module are a collection of methods and properties.

The major difference is that instances can be created from a class in the form of objects, but not from a module.

The scope of the members of a class is only for the lifetime of the object, but the scope of the members of a module exist for the life of the program.


Regards,
Riju.
Reply With Quote
  #3 (permalink)  
Old 06-23-2009
Contributing Member
 
Join Date: May 2009
Location: Navi Mumbai
Posts: 54
Thanks: 20
Thanked 5 Times in 5 Posts
vcite is on a distinguished road
Lightbulb Re: difference between class and module

Quote:
Originally Posted by avismca View Post
difference between class and module?
A Class is a term used in OOP. That is how you build a program/application.

A module is a general term referring to individual units of a large project/application. You break down a project into modules so that you may allocate work to different individuals. Now you may develop this module using procedural/traditional programming or Object Oriented Programming(OOP).

If you use the latter you have to use class.

Hope this solves your query.
Regards,
vcite
Reply With Quote
  #4 (permalink)  
Old 06-23-2009
Junior Member
 
Join Date: Jun 2009
Location: ok
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jpenney is on a distinguished road
Re: difference between class and module

The answer depends on having a bit more context than you've provided.

For instance, a class is a module - in some cases, depending on the language you're using.

A module may not be a class, but it can be.

Classes are thought of as providing more enforcement of information hiding concepts - accessors, private/public/protected/friend interfaces. Modules can provide information hiding but the language it is being used in may not provide enforcement of the information hiding, either in the compiler or the executable (or the vm).

So it would be interesting to know what language you're talking about.
Reply With Quote
Reply

  Geeks Talk > Software Development > VB.NET

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Difference between Joomla Component & Module rubin2008 PHP 3 07-25-2009 11:55 AM
Difference Bettween Class.forName(classname)& new class name prakashreddy.gade Java 1 05-22-2008 10:24 AM
Name of Class Module dineshlade_G9 VB.NET 0 12-10-2007 04:38 AM
Charecters occurance in class module dineshlade_G9 VB.NET 1 11-29-2007 01:55 AM
difference between abstract class and interface manipalreddy.s Java 12 10-25-2007 07:06 AM


All times are GMT -4. The time now is 06:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved