Is it possible to setup objects and it's custom attributes in this way:

CustomObject
FileName as string
FilePath as string
FileType as string
RanBefore as Boolean
CurrentRank as Integer
End CustomObject

then set/get attributes like this:

CustomObject.FileName = "Song.MP3"
If CustomObject.RanBefore = True then...
If CustomObject.CurrentRank > 5 then...

etc.

Is this even the right thing to do? If so, how do I create this?