Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2010 Class Query (Good Class Design in Basics)

$
0
0
Hi Guys,

Sorry if this is in the wrong section, I was unsure where to request this, So apologies if its in the wrong section.

1st : I am quite new to OOP and am trying to get a better understanding of what makes a good class?

My query is regarding Classes in VB.Net.

I have been asked to design a program which will track members current balances and keep track of the balances and reduce them by the cost of a ticket within the lottery and by the number of tickets which a member has.

I have a "beta" version of this program already designed and working but I was looking for some help with "setting up the classes which make up this program"

I have 3 classes which make up this program :

PHP Code:

Class Member

Dim FirstName 
as String
Dim LastName 
as String 
Dim EmailAddress 
as String

Dim newCommand 
as OleDb.OleDbCommand

Public Function NewMember()


End Function


Public Function 
EditMember()


End Function

Public Function 
DeleteMember()

'Here would be a SQL Command Object 


End Function 

PHP Code:

Class Lottery

Dim DrawDate 
as Date
Dim listOfMembers 
as List(Of Member)

Dim newCommand as OleDb.OleDbCommand

Public Function NewLottery()


End Function


Public Function 
EditLottery()


End Function

Public Function 
DeleteLottery()

'Here would be a SQL Command Object 


End Function 

My query is is it acceptable to have database operations relating to a class within the class itself?

Many Thanks for any replys,

Regards Shab : )

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>