Tuesday, December 25, 2007

CRC and Sequence Diagram

Hi Girls,
Check out this link to get a better understanding for CRC and Sequence Diagram..

http://www.cs.toronto.edu/~jm/340S/02/PDF2/SequenceD.pdf

Thursday, April 5, 2007

hi girls,

Hope the preparations for the exam are going on well. All the best for ur exams. Here is a simple gk quiz program. This program can be made much more effective and efficient by modifying it. Hope this helps you to discover something new

#include
using namespace std;
#include
void main()
{
int x,y,z;
x=y=z=0;
char ch1[100],ch2,ch3,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11;
cout<<"\n\t\tGK QUIZ";
cout<<"\n\t\t*******";
cout<<" \n\n\tGuest Enter Your Name: ";
cin>>ch1;
cout<<" \nWelcome "<cout<<"\n\n1.Enter answer in form of 'a','b' and'c'only.";
cout<<"\n\n\nWhat is called as ' THE HOLYLAND'?";
cout<<"\n\ta.Jerusalem\n\tb.Mathura\n\tc.Mecca";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n\n";
}
cout<<"\n2.What is called as ' THE ROOF OF THE WORLD'?";
cout<<"\n\ta.Nepal\n\tb.Rome\n\tc.Tibet";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Good Job.Your score is "<}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n3.What is called as ' THE LAND OF RISING SUN'?";
cout<<"\n\ta.Chicago\n\tb.Japan\n\tc.Tibet";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n4.What is called as ' THE GIFT OF NILE'?";
cout<<"\n\ta.Chicago\n\tb.Egypt\n\tc.Africa";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n5.What is called as ' THE LAND OF MIDNIGHT SUN'?";
cout<<"\n\ta.Norway\n\tb.Japan\n\tc.Australia";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n6.What is called as ' THE LAND OF THUNDERBOLT'?";
cout<<"\n\ta.Bhutan\n\tb.Canada\n\tc.Arab";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n7.What is called as ' THE WINDY CITY?";
cout<<"\n\ta.Jerusalem\n\tb.Japan\n\tc.Chicago";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n8.What is called as ' THE LAND OF WHITE ELEPHANTS'?";
cout<<"\n\ta.Bangladesh\n\tb.Thailand\n\tc.India";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n9.What is called as ' THE CITY OF SEVEN HILLS'?";
cout<<"\n\ta.Rome\n\tb.Nilgiri Hills\n\tc.Tibet";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n10.What is called as ' THE DARK CONTIENENT'?";
cout<<"\n\ta.Asia\n\tb.Australia\n\tc.Africa";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\nRESULT: ";
if(x==100)
{
cout<<"\n\nNo cheating...... You have done this earlier also.";
}
else if(x==90)
{
cout<<"\n\nYou are extremely intelligentYour Score is 90";
}
else if(x==80)
{
cout<<"\n\nYou are intelligent Your Score is 80";
}
else if(50==xx==70x==60)
{
cout<<"\n\nYou are average Your Score is "<}
else if(x<=40)
cout<<"\n\nNo use........ Not even 5 questions right";
getch();
}
hi girls,

Hope the preparations for the exam are going on well. All the best for ur exams. Here is a simple gk quiz program. This program can be made much more effective and efficient by modifying it. Hope this helps you to discover something new

#include
using namespace std;
#include
void main()
{
int x,y,z;
x=y=z=0;
char ch1[100],ch2,ch3,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11;
cout<<"\n\t\tGK QUIZ";
cout<<"\n\t\t*******";
cout<<" \n\n\tGuest Enter Your Name: ";
cin>>ch1;
cout<<" \nWelcome "<cout<<"\n\n1.Enter answer in form of 'a','b' and'c'only.";
cout<<"\n\n\nWhat is called as ' THE HOLYLAND'?";
cout<<"\n\ta.Jerusalem\n\tb.Mathura\n\tc.Mecca";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n\n";
}
cout<<"\n2.What is called as ' THE ROOF OF THE WORLD'?";
cout<<"\n\ta.Nepal\n\tb.Rome\n\tc.Tibet";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Good Job.Your score is "<}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n3.What is called as ' THE LAND OF RISING SUN'?";
cout<<"\n\ta.Chicago\n\tb.Japan\n\tc.Tibet";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n4.What is called as ' THE GIFT OF NILE'?";
cout<<"\n\ta.Chicago\n\tb.Egypt\n\tc.Africa";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n5.What is called as ' THE LAND OF MIDNIGHT SUN'?";
cout<<"\n\ta.Norway\n\tb.Japan\n\tc.Australia";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n6.What is called as ' THE LAND OF THUNDERBOLT'?";
cout<<"\n\ta.Bhutan\n\tb.Canada\n\tc.Arab";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n7.What is called as ' THE WINDY CITY?";
cout<<"\n\ta.Jerusalem\n\tb.Japan\n\tc.Chicago";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n8.What is called as ' THE LAND OF WHITE ELEPHANTS'?";
cout<<"\n\ta.Bangladesh\n\tb.Thailand\n\tc.India";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n9.What is called as ' THE CITY OF SEVEN HILLS'?";
cout<<"\n\ta.Rome\n\tb.Nilgiri Hills\n\tc.Tibet";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\n10.What is called as ' THE DARK CONTIENENT'?";
cout<<"\n\ta.Asia\n\tb.Australia\n\tc.Africa";
cout<<"\n\nUr answer: ";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
}
else
{
cout<<"Sorry wrong answer.\n";
}
cout<<"\n\nRESULT: ";
if(x==100)
{
cout<<"\n\nNo cheating...... You have done this earlier also.";
}
else if(x==90)
{
cout<<"\n\nYou are extremely intelligentYour Score is 90";
}
else if(x==80)
{
cout<<"\n\nYou are intelligent Your Score is 80";
}
else if(50==xx==70x==60)
{
cout<<"\n\nYou are average Your Score is "<}
else if(x<=40)
cout<<"\n\nNo use........ Not even 5 questions right";
getch();
}

Saturday, March 3, 2007

Hi girls,

The following are the operators that can be redefined or can be overloaded in c++.

Redefinable Operators


Operator Name Type


, Comma Binary


! Logical NOT Unary


!= Inequality Binary


% Modulus Binary


%= Modulus assignment Binary


& Bitwise AND Binary


& Address-of Unary


&& Logical AND Binary


&= Bitwise AND assignment Binary


( ) Function call —


* Multiplication Binary


* Pointer dereference Unary


*= Multiplication assignment Binary


+ Addition Binary


+ Unary Plus Unary


++ Increment1 Unary


+= Addition assignment Binary


– Subtraction Binary


– Unary negation Unary


–– Decrement1 Unary


–= Subtraction assignment Binary


–> Member selection Binary


–>* Pointer-to-member selection Binary


/ Division Binary


/= Division assignment Binary


<>


<<>


<<= Left shift assignment Binary


<= Less than or equal to Binary


= Assignment Binary


== Equality Binary


> Greater than Binary


>= Greater than or equal to Binary


>> Right shift Binary


>>= Right shift assignment Binary


>= Greater than or equal to Binary


>> Right shift Binary


>>= Right shift assignment Binary


[ ] Array subscript —


^ Exclusive OR Binary


^= Exclusive OR assignment Binary

Bitwise inclusive OR Binary


= Bitwise inclusive OR assignment Binary



Logical OR Binary


~ One's complement Unary


delete Delete —


new New —

Friday, March 2, 2007

Virtual Functions..

Something I found interesting about the virtual functions..

VTABLE : It contains addresses of virtual functions. The compiler creates a VTABLE for each class that contains virtual functions and for classes that are derived from it. The VTABLE contains the addresses in the order in which virtual functions are defined within the class.

VPTR : It is the address of the VTABLE stored in the object.

Upcasting : It means storing the address of the derived class object in the base class pointer.

I hope it was useful in knowing more about virtual functions....

Monday, February 12, 2007

Welcome Note

Dear Students and Colleagues
Here we all come together in yet another interesting way, to share the knowledge that we posses and keep updating, throughout the entire journey of this life. This blog is a place for all of us to put our OO ideas. This does not deprive any member from discussing or sharing their knowledge of structured languages as well.
Now over to you all to start and keep the blog dynamic.
I welcome you all to join this blog and eagerly waiting to learn more through our discussions and posts.
All the Best! Happy Blogging! :-)