Sunday, July 19, 2009

3 months of Object oriented programming

list kashyap::myToBuyList ()
{
list myList;

myList->addItems
(
myBed = new bed(this->room()),
new pillows (this->room()->myBed()),
new wallPics (this->room()->wall()),
new coolers (this->Laptop()),
new stickers (this->Laptop()),
new books (this, bookName::dataBase, bookName::AI, bookName::programmingParadigms),
new chair (myRoom, chair::looks | chair::comfort),
new beanBag (this->room()),
new amplifier (this->guitar()),
new fruitsContract (this->friends(ArunKJ))
);

m_cashRequired = getCost(myList->getCost());

this->dad()->borrowCash(m_cashRequired);

return list;
}

No comments: