• 0

Yourself as a class


Question

5 answers to this question

Recommended Posts

  • 0

my declaration would look something like this:

class Ryan: public CGod

{

public:

void check_guilt();

bool mouth(); //the following are simply polymorphic functions. because they must physically exist :p

double ears();

double eyes();

bool torso();

double hands();

double arms();

double legs();

double long wang;

};

Link to comment
Share on other sites

  • 0

class Dacris : public Human

{

public:

//properties

bool isMale;

Body body;

//methods

void Eat(Food food);

void Sleep(double amtHours);

void Walk(Point destination);

void Blink(int amtTime);

void Speak(char* text);

bool F*ck(Human other); // returns true if successful :D

bool Excrete(int TypeOfExcretion); // returns true if excretion was found and expelled

bool Kill(Human other);

void Die();//could also be a destructor

//and so forth...

};

//then...

class Body

{

public:

Eye eyes[2];

Ear ears[2];

Arm arms[2];

Leg legs[2];

Nose nose;

int weightKg;

int heightCm;

//and so on...

};

Link to comment
Share on other sites

  • 0

Public Class clsAereux

Private xStructMe As structAereux

Sub New(Optional ByVal BirthDate = "1/17/86")

Me.GenerateAereux()

End Sub

Friend Sub GenerateAereux()

Me.xStructMe = New structAereux()

End Sub

'Aereux's guts:

Structure structAereux

Const xAppearance As String = "5'6, White-Skinned, Brown-haired, Brown Eyes"

Const xBirthDate As Date = 1 / 17 / 86 : Const Age As Integer = 16

Const xNationality As String = "Spanish/Cuban/Moroccan-American"

Const xInterests As String = "Engineering, Programming, Science/Technology, Math, Philosophy"

Const xProgrammingLanguages As String = "VB, VB.NET, C#, C++.NET"

Const xLocation As String = "CA, United States of American"

End Structure

Sub Dispose(Optional ByVal DateOfDeath = "Unknown")

End 'Death

End Sub

End Class

Edited by aereux
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.