الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

برنامج قاعدة بيانات مستشفي

مغلق
بدأه البارودي في 11 مارس 2005 · 1 رد · 3,834 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

Create an array of objects to represent the clinic record for every patient .

§ Thus, there will be two classes , patient (junior) and clinic (senior) .

§ The record for each patien consists of :

o     Patient ID (string)

o     Patien name (string)

o    Birth year (int)

o    Doctor name (string)

As for the patient and doctor names, they will be a single word .

§ In the following , there will be a description for anumber of function needed , you have to decied wither the function will be in junior or senior class:

o A function that display the information of asingle patient . These information are: patien ID , patien name , patien age and doctoe name .

o A function that calculates the patien age based on his/her birth year. You will be able to create this function if went to help, and entered …………….. getdate àgetdate àexamplesàgetdate . try to understand this examble and use it to calaulate the age .

o A function that search for a patient given his/her ID .when the patient is found display his/her information , otherwise display a notifying message.

o A function that searches for adoctor,s patients .first you for the doctor name , then search for all the patients to whom this doctor attends.

o A function that inserts anew patient.

o A function that sorts the inserted patients alphabetically ascending by the patiemt name . you will use the " Selection Sorting" .its technique as follows :

int in , out , index;

for (out=0; out<n-1; out++)

{

            index=out;

            int temp=a[out];

            for(in=out+1; in<n; ++in)

                  if (a[in]<temp)

                  {

                        temp=a[in];

                        index=in;

                  } 

                 temp=a[out];

                  a[out]=a[index];

                  a[index]=temp;

}// end for

o A function that deletes specific patient , given his/her ID .

o A function that displays all the patients.

§ As for main , you will :

o Initiaze the array with some patients' information (let's say 5 patients).

o Sort the inserted items

o View amenu for the user that contains the following choices:

§ Insert anew patient

§ Delet apatient

§ Search for apatient by ID

§ Search for adoctor's patients

§ Display all users

§ Exit the program

o Always keep in mind some value will be read from main and passed to the class interface .on the other hand , values will be received from the class function and used in certain tasks . this will happen after the user enters his/her choice .

الترجمه :

اصنع مصفوفه (of object) التي تمثل سجل العياده لكل مريض بالتالي سيكون هناك (2 classes)

صغرى (junior) للمرضى Class

كبرى (senior) العياده Class

السجل لكل مريض يتكون من رقم المريض ID واسم المريض وسنة الميلاد واسم الطبيب

للاسماء المريض والطبيب سيكون كلمة مفرد

فيما يلي

وصف لعدد من الدوال المطلوبه يجب ان تقرر اذا ما كانت الداله هذه ستكون في CLASS الصغرى ام الكبرى

الداله التى تعرض المعلومات لمريض واحد هذه المعلومات رقم المريض واسمه عمره واسم الطبيب

داله تحسب عمر المريض استنادا الى تاريخ ميلاده تتمكن من صنع هذه الداله اذا ذهبت الى مساعه وادخلت

getdate àgetdateàexamplesàgetdate

حاول ان تفهم هذا المثال واستخدم لحساب العمر

الداله التي تبحث عن مرضى الطبيب اولا تسأل عن اسم الطبيب بعد ذلك تبحث عن كل المرضى الذين يترددون على هذا الطبيب

داله تدخل المرضى الجدد

داله ترتب اسماء المرضى هجائيا

سوف تستخدم selection sorting وطريقتها كما يلي

int in , out , index;

for (out=0; out<n-1; out++)

{

            index=out;

            int temp=a[out];

            for(in=out+1; in<n; ++in)

                  if (a[in]<temp)

                  {

                        temp=a[in];

                        index=in;

                  } 

                 temp=a[out];

                  a[out]=a[index];

                  a[index]=temp;

}// end for

داله تمسح مريض معين بإدخال رقمه

داله تعرض كل المرضى

بالنسبه (main) سوف

تبدأ المصفوفه ببعض معلومات المرضى لنقول مثلا 5 مرضى

نرتب الادوات المدخله

نعاين قائمه المستخدم تحتوي على الخيارات التاليه

ادخال مريض جديد

مسح مريض

بحث عن مريض باستخدام رقمه

البحث عن مرضى طبيب

عرض كل المستخدمسن

الخروج من البرنامج

دائما ضع في الحسبان ان بعض القيم التي سوف تقرأ من (main) وستمر الى class interface من ناحية اخرى القيم سوف تستلم من class function وستسخدم في وظائف خاصه هذا سيحدث بعد ادخال المستخدم لخياره ...

#2

السلام عليكم

ما شاء الله عليك اخي البارودي .. شعلة من النشاط

برنامج جميل ..

ربنا يوفقك ..

بس ممكن التوضيح أكثر

سيكون هنالك 2 classes

هل ستكون بينهما علاقة .. يعني نعرف object من الاول في الثاني .. ام ستكون وراثة ..

وكيف ستكون البداية ..

اي كم مريض .. هل سيتم استخدام المؤشر لحجز قيمة بدائية للمصفوفة و تزيد بأستمرار ( هذا اذا كان array of object )

ام لا داعي للمصفوفة إذا قمنا بأستخدام الفايلات وكلما دخل مريض وضع في الفايل ليتم عرضه لا حقا متى ما اراد المستخدم ذلك .

( عندما اعود الى المنزل سأفكر مليا في البرنامج ور بما يطرأ تغير على مشاركتي )

سلام

برامج في ال C#

إذا اشتكى مسلم في الهند أرقني -- وإن بكى مسلم في الصين بكاني

ومصر ريحانتي والشام نرجستي -- وفي الجزيرة تاريخي و عنواني

وفي العراق أكف المجد ترفعني -- إلى بساتين عز ذات أفنانِ

أرى بخارى بلادي وهي نائية -- وأستريح إلى ذكرى خراسانِ

هذا الموضوع مغلق.

مواضيع مشابهة