السلام عليكم ورحمة الله وبركاته
انا عندي مشروع علي اللينكد ليست
وانا تقريبا انجزت بعض المطلوب مني ولكن الوقت ادركني ومش قادر اكمل وعندي تسليم للمشروع الايام الجاية واريد المساعدة باقصي سرعة ارجو من كل فريق البرمجة بالمنتدي مساعدتي
انا سوف اقدم لكم متطلبات المشروع
هوا مشروع باستخدام الينكد ليست يمثل برنامج قبول وتسجيل صغيريتكون من قائمة رئيسية
1- الطلاب ويتفرع منها قائمة اخري وهي 1 اضافة طالب2-حذف طالب 3-البحث عن طالب4- تعديل بيانات الطالب 5- المواد المطروحة لهذا الفصل6-عرض البيانات الموجودة7- الرجوع للقائمة الرئيسية
2- في القائمة الاولي -اضافة مواد
3- برضو بالقائمة الاولي-تقريري عن الهيئة التدريسية (وهي عبارة عن معلومات تخزن بملف ويتم استدعائه
4-تقرير بعرض طلاب مساق معين
5-خروج
بعرف انو الموضوع مبين كبير بس انا عامل كل شي فيه ومصمم الواجهات وهرفق الكو البرنامج وهوا يعمل ولكن غير كامل اريد منكم ملاحظتك وتعديلاتكم
وهتفهمو المطلوب من خلال تشغيل البرنامج
هادا هوا الكود
#include <iostream>
#include <fstream>
#include<windows.h>
#include<stdlib.h>
#include<conio.h>
using namespace std;
struct node
{ char name[20]; // Name of up to 20 letters
char idnumber[10];
char Specialization[40];
node *next;// Pointer to next node
};
node *start_ptr = NULL;
node *head; // Used to move along the list
/*****************************************************/
struct subject
{ char sname[20]; // Name of up to 20 letters
char snumber[10];
char teachername[30];
subject *next1;// Pointer to next node
};
subject *start_ptr1 = NULL;
subject *head1; // Used to move along the list
/*****************************************************/
void add_student()
{ node *temp, *temp2; // Temporary pointers
ofstream outf("stu.txt",ios::app);
// Reserve space for new node and fill it with data
temp = new node;
cout << "Please enter the name of the student: ";
cin >> temp->name;
cout << "Please enter the id numberof the student : ";
cin >> temp->idnumber;
cout << "Please enter the Specialization of the student : ";
cin >> temp->Specialization;
temp->next = NULL;
outf<<temp->name<<temp->idnumber<<temp->Specialization;;//ادخال البيانات من الزاكرة للملف
outf.close();//اغلاق الملف
// Set up link to this node
if (start_ptr == NULL)
{ start_ptr = temp;
head = start_ptr;
}
else
{ temp2 = start_ptr;
// We know this is not NULL - list not empty!
while (temp2->next != NULL)
{ temp2 = temp2->next;
// Move to next link in chain
}
temp2->next = temp;
}
}
/*****************************************************/
void display_list()
{ node *temp11;
temp11 = start_ptr;
cout << endl;
if (temp11 == NULL)
cout << "The list is empty!" << endl;
else
{ while (temp11 != NULL)
{ // Display details for what temp points to
cout << "Name : " << temp11->name << "\n ";
cout << "idnumber : " << temp11->idnumber << " \n";
cout << "Specialization : " << temp11->Specialization;
if (temp11 == head)
cout << " <-- head node";
cout << endl;
temp11 = temp11->next;
}
cout << "End of list!" << endl;
}
}
/*****************************************************/
void deleteNode()
{
char num;
node *nodePtr, *previousNode;
cout<<"\tinter student id you want to delet"<<endl;
cin>>num;
// If the list is empty, do nothing.
if (!head)
cout<<"the list is empty\n"<<endl;
// Determine if the first node is the one.
else if (head->idnumber[10] = num)
{
nodePtr = head->next;
delete head;
head = nodePtr;
}
else
{
// Initialize nodePtr to head of list
nodePtr = head;
// Skip all nodes whose value member is
// not equal to num.
while (nodePtr != NULL && nodePtr->idnumber[10] != num)
{
previousNode = nodePtr;
nodePtr = nodePtr->next;
}
// Link the previous node to the node after
// nodePtr, then delete nodePtr.
previousNode->next = nodePtr->next;
delete nodePtr;
}
}
/*****************************************************/
// searching private function
void search()
{
char id;
node *nodePt ;
cout<<"\tinter student id you want to search"<<endl;
cin>>id;
// If the list is empty, do nothing.
if (!head)
cout<<"the list is empty\n"<<endl;
else
{
// Initialize nodePtr to head of list
nodePt = head;
// Skip all nodes whose value member is
// not equal to id.
while (nodePt != NULL && nodePt->idnumber[10] != id)
{
nodePt= nodePt->next;
}
cout << "Name : " << nodePt->name << " \n";
cout << "idnumber : " << nodePt->idnumber << "\n ";
cout << "Specialization : " << nodePt->Specialization<<endl;
}
}
/*****************************************************/
void update()
{
char idnum;
node *nodeP;
cout<<"\tinter student id num you want to update"<<endl;
cin>>idnum;
// If the list is empty, do nothing.
if (!head)
cout<<"the list is empty\n"<<endl;
else
{
// Initialize nodeP to head of list
nodeP = head;
// Skip all nodes whose value member is
// not equal to idnum.
while (nodeP != NULL && nodeP->idnumber[10] != idnum)
{
nodeP= nodeP->next;
}
cout << "Please enter new information of the student: \n";
cout << "Please enter the name of the student: ";
cin >> nodeP->name;
cout << "Please enter the id numberof the student : ";
cin >> nodeP->idnumber;
cout << "Please enter the Specialization of the student : ";
cin >> nodeP->Specialization;
}
}
/*****************************************************/
void addsubject()
{ subject *tempp, *tempp2; // Temporary pointers
// Reserve space for new node and fill it with data
tempp = new subject;
cout << "Please enter the name of the subject: ";
cin >> tempp->sname;
cout << "Please enter the id numberof the subject : ";
cin >> tempp->snumber;
cout << "Please enter the techer name of subject : ";
cin >> tempp->teachername;
tempp->next1 = NULL;
// Set up link to this node
if (start_ptr1 == NULL)
{ start_ptr1 = tempp;
head1 = start_ptr1;
}
else
{ tempp2 = start_ptr1;
// We know this is not NULL - list not empty!
while (tempp2->next1 != NULL)
{ tempp2 = tempp2->next1;
// Move to next link in chain
}
tempp2->next1 = tempp;
}
cout<<"THE SUBJECT ADDING COMPLEAT"<<endl;
cout<<" press any key to return to main menu"<<endl;
}
/*****************************************************/
//void write_data()
//{
//fstream file("student.txt",ios::out/ios::binary);
//{
/// if(student.idnumber!=0)
// file.write((char*)&student,sizeof(student));
//}
//}
/*****************************************************/
//void read_data()
//{
//ofstream outf("stu.txt",ios::app);
/*****************************************************/
void main()
{
start_ptr = NULL;
char mn1,mn2;
node student;
subject subj;
do
{
//main secreen
system("cls");
cout<<endl<<endl;
cout<<"\n\t\t\t\t *>MAIN MENU<*\n"<<endl;
cout<<"\t\t\t* * * * ***************** * * * *\n";
cout << "\t\t\t*\t1- STUDENTS\t\t*\n\t" << endl;
cout << "\t\t\t*\t2- EDIT SUBJECTS \t*\n\t" << endl;
cout << "\t\t\t*\t3- REPORT ON FACULTY\t* \n\t" << endl;
cout << "\t\t\t*\t4- VIEW STUDENTS IN * \n\t\t\t\t CERTAIN COURSE\t \n\t" << endl;
cout << "\t\t\t*\t5- Exit \t\t*\n\t" << endl;
cout<<"\t\t\t* * * * ***************** * * * *\n";
cout <<"Pleas choose what Do you want to Do"<<endl;
cin>>mn1;
cout<<endl;
{
switch(mn1)
{
case '1':
// ofstream outf("stu.txt",ios::app);
do
{
system("cls");
cout<<"\t==================================================\n"<<endl;
cout << "\t\t1. Add new student" << endl;
cout << "\t\t2. remove student." << endl;
cout << "\t\t3. search student." << endl;
cout << "\t\t4. update student information." << endl;
cout << "\t\t5. display student list." << endl;
cout << "\t\t6. subjects put up for the current term." << endl;
cout << "\t\t7. Return to Main menu." << endl<<endl;
cout<<"\t==================================================\n"<<endl;
cout<<"Pleas choose operation:"<<endl;
cin >> mn2;
switch (mn2)
{
case '1':
add_student();
break;
case '2' :
deleteNode();
cout<<"deleting done sucssesful!"<<endl;
getch();
break;
case '3' :
search() ;
getch();
break;
case '4' :
update();
cout<<"updating done sucssesful!"<<endl;
getch();
break;
case '5' :
display_list() ;
getch();
break;
case '6' :
cout<<"UNDER construction"<<endl;
cout<<"press any key to continue..."<<endl;
getch();
break;;
case '7' :
break;
default:
cout<<"Invalid Entry.......Try again."<<endl;
cout<<"press any key to continue..."<<endl;
getch();
break;
}
}
while (mn2 != '7');break;
/*****************************************************/
case '2':
system("cls");
addsubject();
getch();
break;
/*****************************************************/
case '3':
cout<<"UNDER construction"<<endl;
cout<<"press any key to continue..."<<endl;
getch();
break;
/*****************************************************/
case '4':
cout<<"UNDER construction"<<endl;
cout<<"press any key to continue..."<<endl;
getch();
break;
/*****************************************************/
case '5':
break;
default:
cout<<"Invalid Entry.......Try again."<<endl;
cout<<"press any key to continue..."<<endl;
getch();
break;
}
}
}while (mn1 != '5');
cout<<"BYE BYE\n TO EXIT"<<endl;
exit(0);
//خاص سليم زعرب
}


