PDA

View Full Version : LoL



SomeGuy
09-30-2009, 12:33 PM
Family yo = new Family();
Person mamma = new Person("fat");
yo.AddPerson(mamma);

Machine forklift = new Machine();

if (yo.mamma.weight == "fat")
{
try
{
forklift.increasepower();
forklift.lift(yo.mamma);
}
catch (FatnessException)
{
messagebox.show("yo.mamma is too fat");
}
}

crystal8484
09-30-2009, 12:39 PM
Something only a true computer nerd could love. lol

JashiK
09-30-2009, 12:40 PM
Something only a true computer nerd could love. lol

lol

SomeGuy
09-30-2009, 12:54 PM
Something only a true computer nerd could love. lol
Yah, I was bored this morning at work...and started writing a yo mama joke in code lol

froggy
09-30-2009, 01:20 PM
c++? sorry it's been a long time since i've programmed

KenYork
09-30-2009, 01:37 PM
c++? sorry it's been a long time since i've programmed

+1

ElegantGremlin
09-30-2009, 01:54 PM
Bravo. I laughed.

SomeGuy
09-30-2009, 02:38 PM
c++? sorry it's been a long time since i've programmed
Eh closer to c# (although there are definitely some syntax errors, it's not like it will compile as is even if the objects all existed) ...

SomeGuy
09-30-2009, 02:55 PM
using System;

namespace YoMammaJoke
{
public class Family
{
private System.Collections.Hashtable MembersOfFamily;

public Family()
{
MembersOfFamily = new System.Collections.Hashtable();
}

public void AddPerson(Person person)
{
MembersOfFamily.Add(person, person);
}

public string GetWeight(Person person)
{
return ((Person)MembersOfFamily[person]).Weight;
}

public Person GetPerson(string name)
{
foreach (Person person in MembersOfFamily.Values)
{
if (person.Name == name)
{
return person;
}
}
return null;
}
}

public class Person
{
private string _Weight;

private string _Name;

public Person(string name, string weight)
{
_Name = name;
_Weight = weight;
}

public string Weight
{
get { return _Weight; }
set { _Weight = value; }
}

public string Name
{
get { return _Name; }
set { _Name = value; }
}
}

public class Machine
{
public Machine()
{
}

public void IncreasePower()
{
Console.WriteLine("Power Increased");
}

public void Lift(Person person)
{
if (person.Weight == "fat")
{
throw new Exception(person.Name + " is too fat!");
}
}
}

class Program
{
static void Main(string[] args)
{
Family yo = new Family();
Person mamma = new Person("Mamma", "fat");

yo.AddPerson(mamma);
Console.WriteLine("Added yo Mamma is fat");

Machine forklift = new Machine();

if (yo.GetWeight(mamma) == "fat")
{
try
{
forklift.IncreasePower();
forklift.Lift(yo.GetPerson("Mamma"));
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
}



LoL this one actually runs :) It's kind of crude, but it works.

ElegantGremlin
09-30-2009, 04:58 PM
this one actually runs :) It's kind of crude, but it works.

What's the output?

crono06
09-30-2009, 05:09 PM
Damn... reminds me of the days when I took VB in high school and 1st year uni...

Thrizzl3
09-30-2009, 05:12 PM
Java FTW!!

ds2chan
09-30-2009, 05:24 PM
using System;

namespace YoMammaJoke
{
public class Family
{
private System.Collections.Hashtable MembersOfFamily;

public Family()
{
MembersOfFamily = new System.Collections.Hashtable();
}

public void AddPerson(Person person)
{
MembersOfFamily.Add(person, person);
}

public string GetWeight(Person person)
{
return ((Person)MembersOfFamily[person]).Weight;
}

public Person GetPerson(string name)
{
foreach (Person person in MembersOfFamily.Values)
{
if (person.Name == name)
{
return person;
}
}
return null;
}
}

public class Person
{
private string _Weight;

private string _Name;

public Person(string name, string weight)
{
_Name = name;
_Weight = weight;
}

public string Weight
{
get { return _Weight; }
set { _Weight = value; }
}

public string Name
{
get { return _Name; }
set { _Name = value; }
}
}

public class Machine
{
public Machine()
{
}

public void IncreasePower()
{
Console.WriteLine("Power Increased");
}

public void Lift(Person person)
{
if (person.Weight == "fat")
{
throw new Exception(person.Name + " is too fat!");
}
}
}

class Program
{
static void Main(string[] args)
{
Family yo = new Family();
Person mamma = new Person("Mamma", "fat");

yo.AddPerson(mamma);
Console.WriteLine("Added yo Mamma is fat");

Machine forklift = new Machine();

if (yo.GetWeight(mamma) == "fat")
{
try
{
forklift.IncreasePower();
forklift.Lift(yo.GetPerson("Mamma"));
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
}



LoL this one actually runs :) It's kind of crude, but it works.

lol.. this has turned into a story rather than a joke.. people will be heckling you to get to the punchline..

Go_Habs_Go
09-30-2009, 05:40 PM
Java FTW!!

definitely java... :chuckle

SomeGuy
09-30-2009, 06:04 PM
What's the output?
You tell me.