Skip to main content

Re: ::: vuaskari.com ::: Any Solution for CS201 Assignment.

#include <iostream.h>
#include <string.h>

using namespace std;
class Node{
public:
int value;
string Name;
Node * next;
Node(int a, string b)
{
this->value=a;
this->Name=b;
this->next=NULL;
}
};
Node *Head;


void addNod(int value, string name)
{
Node *p;
if(Head==NULL)
{
Head = new Node(value,name);
}
else
{
p=Head;
while(p->next!=NULL)
{
p=p->next;
}
p->next = new Node(value,name);
}
}
void SearchThis(string a)
{
while(Head->Name!=a)
{
Head=Head->next;
}
cout<<"found: "<< Head->value<<" "<<Head->Name<<endl;
}
void DeleteFunction(string nameToDelete)
{
Node *Current, *NextCurrent;


if(Head->Name==nameToDelete)
{
Current=Head;
Head=Head->next;
delete Current;
}
else
{
Current=Head;
while(Current!=NULL && Current->Name!=nameToDelete)
{
NextCurrent = Current;
Current = Current->next;
}
if(Current)
{
NextCurrent->next = Current->next;
delete Current;
}
}
}
void PrintList()
{
Node *Print;
Print = Head;
while(Print!=0)
{

cout<<Print->value<<" "<<Print->Name<<endl;
Print=Print->next;
}

}






int main()
{
cout<<"\Welcome to Student Information System (Pakyouth)\n"<<endl;
int choice;
cout<<"1- Enter student information"<<endl;
cout<<"2- Search student by ID"<<endl;
cout<<"3- Search student by Name"<<endl;
cout<<"4- Delete student information"<<endl;
cout<<"5- Print all students"<<endl;
cout<<"6- Quit"<<endl;
int rol;
string na;
while(choice!=6)
{
cout<<"\n\n \t\tenter ur choice \n "<<endl;
cin>>choice;

if(choice==1)
{

cout<<"enter roll number ";
cin>>rol;
cout<<"enter name ";
cin>> na;
addNod(rol,na);
}
else if(choice==3){
cout<<"enter student name to search "<<endl;
cin>>na;
SearchThis(na);
}else if(choice==4){
cout<<"cout enter student name "<<endl;
cin>>na;
DeleteFunction(na);
}else if(choice==5){
PrintList();
}else if(choice==2){
cout<<"sorry, not codded this function "<<endl;
}else{
return 0;
}



}


system("pause");
};
find attached the solution. plz made necessary changes

On Wed, Nov 2, 2011 at 2:36 PM, mc110200336 Raja Khurram Shahzad <mc110200336@vu.edu.pk> wrote:
Please share the solution .

thanks in advance

On Wed, Nov 2, 2011 at 9:35 AM, mc110402230 Suhail Ahmad Alvi <mc110402230@vu.edu.pk> wrote:


--
 
Sohail Ahmad Alvi.
 

--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en

--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en



--
Fida Saghar

--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en

Comments

Popular posts from this blog

Re: ::: vuaskari.com ::: CS408 - FINAL TERM SUBJECTIVE WITH REFERENCE SOLVED BY UMAIR SAULAT

GREAT WORK On Wed, Feb 20, 2013 at 11:30 PM, Umair Saulat < saulat.umair@gmail.com > wrote: CS408- Human Computer Interaction Solved Subjective Fall Semester 2012   QNo.1    it has been observed that most computer users use menu option for input instead of keyboard accelerator. What is the reason behind it? (2 Marks) Answer:- 1.        Menu options are easier to find. 2.        You don't have to memories the keys for menu option but for key board accelerators you have to memories them REF:: Handouts Page No. 127   QNo.2    Define active intervention.  (2 Marks) Answer:- Active intervention with the participant and actively probes the participant understands of whatever is being tested. REF:: Handouts Page No. 276 QNo.3    what is Ubiquitous Computing? (2 Marks) Answer:- The most profound technologies are those that disappear. They weave themselves into the fabric of everyday life until they are indi

Updating our Google Account inactivity policy

Every day Google works hard to keep you and your private information safe and secure by preventing unauthorized access to your Google Account with our built-in security protections. And keeping you safe means having strong privacy practices across our products that minimize how long we store your personal files and any data associated with them. We want to protect your private information and prevent any unauthorized access to your account even if you're no longer using our services. Therefore, we are updating the inactivity period for a Google Account to two years across all our products and services. This change starts rolling out today and will apply to any Google Account that's been inactive, meaning it has not been signed into or used within a two-year period. An inactive account and any content in it will be eligible for deletion from December 1, 2023. What this means for you: These changes do not impact you unless you h

Re: ::: vuaskari.com ::: I CAN HELP YOU IN INTERNSHIP REPORT AND VIVA PRESENTATION ETC.

Assalam u Alaikum Sir 2013/14 me M.B.A me admission tha...freeze kar dia due to family issues...doobara se unfreeze ho sakta hai? Mc090204573 ye id thi On Tue, Feb 9, 2016, 11:52 AM 'Ambreen Shahzadi' via ::: www.vuaskari.com ::: < vuaskari_com@googlegroups.com > wrote: I need the help that how to improve my c.g.p in short time to give b.cz i m doing job in bnk and here is too much taugh secdule so plz hlp nd guide me after 4 smster i cant able to achv 2+ cgp thats why not slct the spclization...tellme what to do in this case... On Sat, 2/14/15, Ahsen Abbasbukhary < ahsen.green.mba@gmail.com > wrote:  Subject: ::: vuaskari.com ::: I CAN HELP YOU IN INTERNSHIP REPORT AND VIVA PRESENTATION ETC.  To: vuaskari_com@googlegroups.com  Date: Saturday, February 14, 2015, 1:49 AM  Dear all fallows,     I have cleared my internship report and  VIVA Presentation and over all  my MBA program in 2014. I am receiving my degree in VU 6th  convocation in