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

سؤال برمجة جافا

مغلق
بدأه mousa_h1985 في 22 أكتوبر 2008 · 1 رد · 469 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

1. Create a class IntegerSet. Each object of the class can hold integers in the range 0 through 100. A set is represented internally as an array of ones and zeros. Array element a is 1 if integer i is in the set and it is 0 if i is not in the set. The default constructor initializes the set to the so classed “empty set Ø or { }” i.e., a set whose array representation contains only zeros. The following operations are to be provided with any IntegerSet Object:

· intersectionOfIntegers: member method that creates a set which is a set-theoretic intersection of two existing sets. i.e., an element of the new set’s array is 0 if that element is 0 in either or both sets, and the element of the new set’s array is 1 if that element is 1 in each of the existing sets.

· unionOfIntegers: member method that creates a set which is a set-theoretic union of two existing sets. i.e., an element of the new set’s array is 1 if that element is 1 in either or both sets, and the element of the new set’s array is 0 if that element is 0 in each of the existing set.

· insertElement: member method that inserts a new integer into the set.

· deleteElement: member method that deletes an integer from the set.

· setPrint: member method that prints the elements of the set. e.g., the set that contains 3, 56, and 100 will be printed as: {3, 56, 100}.

· isEqualTo: member method that determine if two sets are equal.

Write a driver class that a number of inetgerSet objects and manipulate the above operations on them.

Hint: To answer exercise 2 design the UML then write the Java class

#2

حياك الله أخي ،،

الموضوع مخالف :) ، والسبب العنوان خاطئ ، والمحتوى باللغه الأنجليزيه ، وكاتب الموضوع لم يضع محاولاته ، ويريد حل واجب منزلي من غير تعب ولا جهد ..

ضع سؤال واضح ومفهوم باللغه العربيه ، وضع محاولاتك في الحل ، وبعدها باذن الله سوف نساعدك في أسرع وقت ممكن ،

بالتوفيق أخوي ،

http://informatic-ar.com منصة تعليمية عربية في علوم الحاسب والبرمجة

https://moalfat.com  للكتب الالكترونية والكورسات التعليمية

Everything we see now is just an engineering solution based on old science

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

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