خدمات البرمجة ---- أطلب أي مساعدة في البرمجة - ملتقى الشفاء الإسلامي

 

اخر عشرة مواضيع :         تعرف على أداة تيك توك الجديدة لحماية صناع المحتوى من التزييف العميق (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 390 )           »          جوجل تطلق Android 17 QPR1 Beta 7 لإصلاح أخطاء الإعدادات وتحسين النظام (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 376 )           »          iPhone 18 Pro Max قد يحصل على أكبر تطوير للكاميرا منذ سنوات (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 390 )           »          جوجل توسع قدرات AI Mode لدعم يوتيوب ميوزيك وكانفا وإنستاكارت (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 385 )           »          لا تنتظر iPhone 18 فى سبتمبر.. هذه الهواتف التى تستعد آبل لإطلاقها هذا العام (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 392 )           »          8 مميزات من أنثروبيك.. هل استلهمت OpenAI أفكار Claude لتطلق نموذج GPT-5.6؟ (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 398 )           »          هل تضع هاتفك في الثلاجة لتبريده؟ الخبراء يحذرون من عواقب خطيرة (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 397 )           »          Gemini يتأخر مجددًا.. جوجل تعيد بناء أقوى نماذجها بعد تعثره في البرمجة (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 413 )           »          واتساب يسهّل التحكم فى الميكروفون على آيفون.. ميزة جديدة لتحسين جودة المكالمات (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 396 )           »          ChatGPT Work.. وكيل ذكي يحول GPT-5.6 Sol إلى زميل عمل ينفذ المهام حتى النهاية (اخر مشاركة : ابوالوليد المسلم - عددالردود : 0 - عددالزوار : 567 )           »         

العودة   ملتقى الشفاء الإسلامي > قسم الصوتيات والمرئيات والبرامج > ملتقى البرامج والانترنات والجرافيكس
التسجيل التعليمـــات التقويم

ملتقى البرامج والانترنات والجرافيكس كل ما يختص بالكمبيوتر والانترنات من برامج ومعلومات وخدمات مجانية

 
 
أدوات الموضوع انواع عرض الموضوع
Prev المشاركة السابقة   المشاركة التالية Next
  #17  
قديم 17-03-2009, 09:59 PM
zaynubya zaynubya غير متصل
عضو مبدع
 
تاريخ التسجيل: Oct 2007
الجنس :
المشاركات: 893
افتراضي رد: خدمات البرمجة ---- أطلب أي مساعدة في البرمجة

****** Oriented Programming


Write a program to carry out manipulation on sets. Create a class called set with two private members, the elements of the set and the size of the set. The elements should be an array of integers to hold an appropriate number of elements (e.g. 20). Provide a default constructor to initialize a newly defined set to be the empty set, the size of which should be zero. Provide also three utility functions to add, remove and to print elements of a set.

Provide for class set that you have developed member functions to implement the following operations on sets using appropriate member functions:
a) Determine the union of two sets and store the result in a third set;
b) Determine the intersection of two sets and store the result in a third set;
c) To test if a given set is the empty set;
d) To test if one set is included in another set.


Hint:
The class should have data members an array of integers of a large size (for ex 20) and N= number of elements in the set.
As you first create the set, N=0 (set by the constructor)

The add function should add one element to the set. and not add two sets.
void set::add(set &S, int x) will make x an element of the set S.

for example, if S1 is still the empty set, and we call function add to add element 2 to S1, then S1 becomes:
S1 = {2}, N=1.
To add element 3:
S1={2,3}, N=2
To remove element 2,
S1={3}, N=1
therefore to remove an element, in the implementation of that function, we search the array to see if that element exists, and then if found, you have to slide the remaining elements back one position (i.e. no empty spots should exist in the array.)


A utility function is a member function that can return a set. But you don't need the add function to return a set. Whereas the union and intersection functions may return the resulting set.

If you really need a function (get or set) you can add it and justify its need in the comments.

__________________
بالصبر تبلغ ما ترجوه من أمل *** فاصبر فلا ضيق إلا بعده فرج




رد مع اقتباس
 


الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

🤍 قناة "وَشِفَاءٌ لِّمَا فِي الصُّدُورِ" 🤍


الاحد 20 من مارس 2011 , الساعة الان 01:21:21 صباحاً.

Powered by vBulletin V3.8.5. Copyright © 2005 - 2026, By Ali Madkour

[حجم الصفحة الأصلي: 333.64 كيلو بايت... الحجم بعد الضغط 331.92 كيلو بايت... تم توفير 1.73 كيلو بايت...بمعدل (0.52%)]