موقع طلبة جامعة البحرين

يمكنك تصفح الموقع كزائر ولكن ندعوك لتسجيل عضوية خاصة بك لتحصل على كافة الصلاحيات مثل تنزيل ملفات المكتبة وقراءة تعليقات هيئة التدريس وغيرها. يمكنك الحصول على عضوية مجانية بالضغط على زر تسجيل. إذا قمت بالتسجيل مسبقا فيمكنك الضغط على زر دخول.

تسجيل دخول
  • قسم المكتبة الجامعية مغلق مؤقتا بعد الاستهداف التي تعرضت له بعض خدمات أمازون في البحرين، جاري استرجاع الملفات ونقلها إلى سيرفرات جديدة وسيتم بعدها اعادة افتتاح المكتبة

ITCS215 للفصل الدراسي الأول 2015 - 2016

احتاج صورة لأسئلة التيتوريال :RpS_crying:
 
أحد يقدر يشرح ليي هالمسألة وحلها موجودة في ملف في لمكتبة

Write a membership function Mix that has two parameters of linkedListType list1 and list2 . The method combines the two linked lists in one list in the following way. It takes the right half (half is the number of nodes by 2 if they are even, otherwise number of nodes by 2 plus 1) the linked list 1 and put it at the beginning of the newly created linked list, then it takes the alternate nodes of linked list 2 and connect it to the newly created linked list. You can use any member function.
List 1

[TABLE="width: 100%"]
[TR]
[TD]8

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]10

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]7

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]12

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]22

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]90

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]4

[/TD]
[/TR]
[/TABLE]
first last


[TABLE="width: 100%"]
[TR]
[TD]2

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]19

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]70

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]82

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]24

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]90

[/TD]
[/TR]
[/TABLE]
List 2 first last

The produced list is

[TABLE="width: 100%"]
[TR]
[TD]12

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]22

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]90

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]4

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]2

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]70

[/TD]
[/TR]
[/TABLE]
[TABLE="width: 100%"]
[TR]
[TD]24

[/TD]
[/TR]
[/TABLE]
first last

The prototype of the method is
void linkedListType <Type> :: Mix (linkedListType <Type> &list1, linkedListType<Type> &list2);
template <class Type>
void linkedListType <Type> :: Mix (linkedListType <Type> &list1, linkedListType<Type> &list2)
{ nodeType <Type> *current;
Int l, mid;
l = list1.length();
current = list1.first;
if (l % 2 == 0) mid= l/2;
else mid = (l+1) / 2;
for (int count = 0; count < mid; count++)
current = current ->link; // move current until we reach the middle
while (current != NULL)
{ insertLast(current-> info);
Current = current->link;
}
current = list2.first;
while (current !=NULL)
{ insertLast(current ->info);
current = current ->link;
/* we check to be sure the current in not null (no to have a error message) */
if (current ! = NULL) current = current ->link;
}
}


مافهمت الحل :nosweat:
 
التتوريال #3 اخر مسالة (10)
يقولك لازم تستخدم recursion
احنا للحين ما وصلنا ليه ؟؟؟؟؟؟؟؟؟؟؟؟؟؟
وهو داخل ويانا في التست ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
 
هلا

ان شاء الله باجر الصبح بانزل اسالة التتوريال كامل 1 و 2 و 3

الحين ما في سكن باجر بكون شغال :smile:
 
  • Like
التفاعلات: hss
ياريت احد ينزل صورة لورقة تيتوريال 3 الليلة
ماعندي اياها
ومحتاجة احل الاسئلة ضروري ..
 
صور التتوريال
3.


2.

13519691842.jpg
[/url][/IMG]

1.
13519691863.jpg
[/url][/IMG]
 
  • Like
التفاعلات: hss
اللي حل آخر مسالة
ياليت يفيدنا ؟؟؟
 
رحم الله والديك خيو
roma king
ماقصرت
 
في احد حل آخر مسالة تتوريال #3
reversePrint to be included in class orderedLinkedListType to print using recursion
 
سلام يا جماعة

شخبار الدراسة للإمتحان باجر ؟ :whistling:
انا احس روحي اوكي .. بسوي زين :shiny::RpS_lol::whistling:

بس
الدكتور اليوم يقول بيعطونا ورقة حق ArraylistType مكتوب فيها الميثودز
اما linkedListtype ما بيعطونا .. انا ما اعرفهم :nosweat: احد عنده اياهم ؟
 
سلام يا جماعة

شخبار الدراسة للإمتحان باجر ؟ :whistling:
انا احس روحي اوكي .. بسوي زين :shiny::RpS_lol::whistling:

بس
الدكتور اليوم يقول بيعطونا ورقة حق ArraylistType مكتوب فيها الميثودز
اما linkedListtype ما بيعطونا .. انا ما اعرفهم :nosweat: احد عنده اياهم ؟


وعليكم السلام


كود:
template<class Type>
class linkedListType
{
  friend ostream& operator<<(ostream&, const linkedListType<Type>&);
public:
  const linkedListType<Type>& operator=(const linkedListType<Type>&);
  void initializeList();
  bool isEmtyList();
  int length();
void destroyList(); 
  Type front();
  Type back();
  bool serach(const Type& searchItem);
  void insertFirst(const Type& newItem);
  void insertLast(const Type& newItem);
  void deleteNode(const Type& deleteItem);
  linkedListType();
  linkedListType(const linkedListType<Type>& otherList);
  ~linkedListType();
protected:
  int count;
  nodeType<Type> *first;
  nodeType<Type> *last;
private:
  void copyList(const linkedListType<Type> otherList);
};
 
نو كومنت :RpS_glare:

شخبار الامتحان ؟؟؟؟

حسيته ماكان وااايد صعب بس انا ماكنت دارسة عدل :no:

يللا ان شاء الله نعوض في التست الثاني :whistling:

 
بشكل عام مستوى الامتحان لا بأس فيه .. معقول المستوى
أني شيرت بالسؤال الثالث شوي على ما ارتب فكرته
و ربط النود الـ 2 مع بعض الي نضيفهم .. على آخر وقت خليت هالستيتمت و لا ادري عدل لو لا ^^"

ان شاء الله خير .. الله يوفق الجميع​
 
الامتحان كان في النص .. مو صعب ولا سهل ..

بس الوقت ما يكفي حق ترتيب الافكار .. خصوصاً ان هذي برمجة ..
​
 
الامتحان كان في النص .. مو صعب ولا سهل ..

بس الوقت ما يكفي حق ترتيب الافكار .. خصوصاً ان المقرر برمجة مو مقرر حفظ ..
​

اي لاحظت ان محد خلص من وقت
بالفعل الأسئلة تحتاج تقراها اكثر من مرة و ترتب الأفكار عشان تعرف شلون تكونهم برنامج
 
الامتحان كان في النص .. مو صعب ولا سهل ..

بس الوقت ما يكفي حق ترتيب الافكار .. خصوصاً ان هذي برمجة ..

​

ايي بالضبط اني انقهرت من السؤال الثالث كنت بعرف احله بس ما مداني فصارت الخطوات عفسة

:RpS_glare: كلش تضايقت لأن الوقت ما كفى بس ان شاء الله خير
​
 
ما في اخبار عن الدرجات ؟؟؟؟؟؟؟؟؟؟؟:whistling:
 
عودة
أعلى أسفل