Recently I did a project for a good friend of mine who is studying at another University. He got the problem to design a Student Information System using Object Oriented Concepts. But the Language was C++. Worst this was it was command line project means not to deal with any GUI. It was little bit hard, since I haven't done such kind of big project using command prompt, even in Java. I'm more familiar with Java.
But we did a C++ project at SLIIT as a group project. It was a system
for a Phamacy. "Good Health Pharmacy". It was an quite interesting
projects because it was GUI based project. I'm the one who designed all
the interfaces in colorful manner.. I did less programming part
there.Most of the core codes were done by my friend Tharindu
Edirisinghe.
It was based on Linked lists, which was dynamic data.
So since i had this project I referred this software to do the SIS. There were no limitations and I had to consider about Object Oriented Concept and command prompt. I used linked lists as the data storing method. ..Actually it was a real challenge to me.
I used Visual studio 2008 as a IDE and use visual C++.
This is the main menu..
I used switch caseto go through the menu items as usual.
PROBLEM?? "what if the user enters a letter rather than typing any number ? " Anyway it should be validated to manage all the inputs..Since I have used 'int ' type variable to catch the users selection.
Yes we can filter these numbers using case statements.. BUT it gave me a exception to all invalid inputs like letters.
I googled my problem and this is what I found...
int a;
cout<<"Your Selection : ";
cin>>a;
while (!cin.good())
{
system( "CLS" );
cin.clear();
cin.ignore(1024, '\n');
cout << "Invalid Selection Type only digits..."<<endl;
cout<<"Your Selection : ";
cin>>a;
}
Great memories with Good Health Pharmacy Project.... We did it great... :D
ReplyDeleteyaa what great project... awsm memories :D
Delete