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

سؤال جافا ارجو الاجابه عليه ولكم جزيل الشكر

مغلق
بدأه mousa_h1985 في 22 أكتوبر 2008 · 1 رد · 485 مشاهدة · في 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

هل لديك محاولات لحل السؤال ؟؟؟ضع لنا حلك وسوف نساعدك في اخطاء التي تظهر معك , غير ذلك سوف يكون موضوع مخالف لشروط المشاركات في المنتدى :rolleyes:

تم تعديل هذه المشاركة بواسطة ahmad123 في 23 أكتوبر 2008 في 00:57

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

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

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…