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

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

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

ITCS112 - ITCS104 - ITCS102 للفصل الصيفي 2014 - 2015

ممكن احد يشرح لي البوينتر ؟؟

شكرا اللي شرحت لنه الاوفر لودينغ كنت مو عارفته ...
 
يسلموو سيد حسين
 

مشكورة ااختي اخيرا قدرت افتح السؤال
هذي هو


Write a recursive function that finds and returns the sum of an array.
PART A
int sum(int a[],int size);


PART B

Write a recursive function that prints a string backwards.
void backwards(char *s, int len);


PART C

Write a program (main function) to test the two functions
.​
 
مشكورة ااختي اخيرا قدرت افتح السؤال
هذي هو


Write a recursive function that finds and returns the sum of an array.
PART A
int sum(int a[],int size);


PART B

Write a recursive function that prints a string backwards.
void backwards(char *s, int len);


PART C

Write a program (main function) to test the two functions
.​


:no::no::no: يحراام السؤال كاامل احنا بس باارت A
 
سلاام عليكم شلونكم شخباركم
الي درسة دكتورة امل غانم يعطني سؤال الاسايمن الأخير لان ما ينفتح عندي
بليززز بسرعة لان باجر تسليم وانا لحد الآن ما دري شنو سؤال
ومشكورين ما تقصرون عساكم ع قوة
 
اخواتي واخواني ممكن احد يشرح لينا شبتر 17​
 
سلاام عليكم شلونكم شخباركم
الي درسة دكتورة امل غانم يعطني سؤال الاسايمن الأخير لان ما ينفتح عندي
بليززز بسرعة لان باجر تسليم وانا لحد الآن ما دري شنو سؤال
ومشكورين ما تقصرون عساكم ع قوة

Consider the following class:
#include<iostream>
Class MyClass
{
private:
int *Arr;
int maxSize;
int length;
Public:
//Constructor:
//1)Initialize maxSize to the value Max,
//2)intialize length to zero
//3)Create dynamic array of size maxSize
Myclass(int Max=20);

//Destructor
~MyClass();

//Print the elements in the Arr
void print();

//Add the itme to the Arr, and increase the length by 1
void AddElement(int item);

//Remove the last element from Arr, and reduce length by 1
void removeElement();

//check if Arr is Empty
bool isEmpty();

//check if Arr is Full
bool isFull();

//search for the item in Arr, if the item is found then return true, else return false
bool search(int item);

};

Part A
Rewrite the above class as a template class to become a list of any type, then write the implementation of each member function.
Part B
In the main function, write the following statements
1. Declare an object named ListInt, where the array should be a list of integers, and maxSize = 20;
2. Insert the values {3, 4, 5} to listInt defined in (1).
3. Print the elements in listInt.
4. Declare an object named ListChar, where the array should be a list of char, and maxSize = 10;
5. Insert the values {‘a’,’b’,’c’} to ListChar defined in (4).
6. Search for the item ‘D’ in ListChar and output an appropriate message to show if the element is found in the array or not.
​

التسليم آخر شي اليوم الساعة 4 ​
 
سلاام عليكم
مشكورة اختي مجنونة كمياء 2008
ما تقصرين
 
سؤال:
من احسن دكتور ل 102
Dr. Ramzi Al-Majid
Dr. Mayyadah Faisal
بس هذلين اللي يناسني اوقاتهم
فقولوا ليي الافضل واذا كلهم مو زينينين بعد قولوا ليي عشان آخذ وايا سكشن مو مكتوب اسم
 
جبتر 17
جم محااضرة غايب :shiny:
كله بسبب التستات :anger2:
بقول ليكم اللي أعرفه, ان شاء الله يفيدكم, :shiny:

الريكيرجن,
هو فنكشن, تسوي call حق نفسها,,
فيها شرط يوقفها, الـ call
يسمونه base case
يعني مثلاً

if(num==0)return;

و عندنا شي يسمونه general case

هو الـ case اللي يصير داخله call

يعني مثلاً هذا برنامج,,

PHP:
void rec(int x)
{
if(x==0)return;
else
{
cout<<x<<endl;
rec(num-1);
}

لو عطيناه مثلاً 5 ,,
بيجي, يجيك, x==0 ؟؟
طبعاً لا,
بيروح للـ else
بيسوي cout
و بيسوي call حق الفنكشن بقيمة 4
و بعدين 3
و 2
لين يوصل 0​
 
سؤال:
من احسن دكتور ل 102
Dr. Ramzi Al-Majid
Dr. Mayyadah Faisal
بس هذلين اللي يناسني اوقاتهم
فقولوا ليي الافضل واذا كلهم مو زينينين بعد قولوا ليي عشان آخذ وايا سكشن مو مكتوب اسم


ميادة الافضل
خذي عندها وانتي مغمضة
دايما تشرح على مستوى الطلاب اللي يناسبهم
عموما وباختصار توكلي على الله
 
جبتر 17

جم محااضرة غايب :shiny:
كله بسبب التستات :anger2:
بقول ليكم اللي أعرفه, ان شاء الله يفيدكم, :shiny:​

الريكيرجن,
هو فنكشن, تسوي call حق نفسها,,
فيها شرط يوقفها, الـ call
يسمونه base case
يعني مثلاً​

if(num==0)return;​

و عندنا شي يسمونه general case​

هو الـ case اللي يصير داخله call​

يعني مثلاً هذا برنامج,,​


PHP:
void rec(int x)
PHP:
[center]{
if(x==0)return;
else
{
cout<<x<<endl;
rec(num-1);
}[/center]


لو عطيناه مثلاً 5 ,,
بيجي, يجيك, x==0 ؟؟
طبعاً لا,
بيروح للـ else
بيسوي cout
و بيسوي call حق الفنكشن بقيمة 4
و بعدين 3
و 2

لين يوصل 0​


لا تغيب :bleh: .. إنته شخص مهم في المحاضرة .. غيابك يأثر على كثيرين منّا >> إهني :icon30:


فاهمة اللي كاتبنه .. بس ما عارفة الدورة الحياتية اللي تمر إبها الريكيرجن .. لأن دكتورتنا شرحتها ع السريع .. ما شوفها الا ترسم وتمشي .. !!

فـ إنته لازم بتدرسه .. فإذا درسته .. شرحه إلينا .. رحم الله والديك ..

عساك ع القوة
​
 
السلام عليكم
شخباركم
حدي اسايمنت مو عارفه احله كامل ياليت احد بس يشرح لي الفكرة خصوصا مال bool operater?
لان باجر التسليم

Consider the class myClass given below

class myClass
{

friend void display(const myClass c);


private:
int x,y;
public:
myClass();
~myClass();
void set(int a,int b);
int getX();
bool operator < (const myClass z);
int operator + (const myClass z);

};

1. Rewrite the above class as template so that it will becomes a class of any type (not just integers).
2. Implement/Code the functions given in the above class.
3. In the main program:
a. Declare two objects C1 and C2 of type myClass.
b. Set object C1 to 3 and 4 respectively.
c. Set object C2 to 4 and 5 respectively.
d. Use operator < to compare between class C1 and C2 and print an appropriate message (comparing x’s only).
e. Use operator + to add classes C1 and C2 and print the result (adding y’s only).
f. Call the friend function display (C1) to Print the data of class C1.
 
السلام عليكم
شخباركم
حدي اسايمنت مو عارفه احله كامل ياليت احد بس يشرح لي الفكرة خصوصا مال bool operater?
لان باجر التسليم

Consider the class myClass given below

class myClass
{

friend void display(const myClass c);


private:
int x,y;
public:
myClass();
~myClass();
void set(int a,int b);
int getX();
bool operator < (const myClass z);
int operator + (const myClass z);

};

1. Rewrite the above class as template so that it will becomes a class of any type (not just integers).
2. Implement/Code the functions given in the above class.
3. In the main program:
a. Declare two objects C1 and C2 of type myClass.
b. Set object C1 to 3 and 4 respectively.
c. Set object C2 to 4 and 5 respectively.
d. Use operator < to compare between class C1 and C2 and print an appropriate message (comparing x’s only).
e. Use operator + to add classes C1 and C2 and print the result (adding y’s only).
f. Call the friend function display (C1) to Print the data of class C1.

هذا شرح لـ"عبير البنفسج"
عن الاوفرلودينغ
https://www.uob-bh.com/forum/showpost.php?p=51168&postcount=561​
 
السلام عليكم
شخباركم
شوفوا ليي ذي الاسايمنت اش طول ياريت تساعدوني
لاني مو فاهم شي:sad_1:

Question1: Function: output_list
You need to create a recursive function called output_list that will create a list of integers based on the 3 parameters: start, end and interval. The function should generate a list of numbers starting with the number start, each successive number should be closer to the number end and the numbers should all be interval apart.
Example2: Example1:
Start=1, end=650, interval=100
The output: 1 101 201 301 401 501 601 Start=3, end=11, interval=2
The output: 3 5 7 9 11


Question2: Function: sum_list
You need to create a recursive function called sum_list that will return the sum of a list of integers based on the 3 parameters: start, end and interval.
Example2: Example1:
Start=1, end=650, interval=100
Result: 1+101+ 201+ 301+401+ 501+ 601
Output: 2107 Start=3, end=11, interval=2
Resul= 3+ 5 + 7+ 9+ 11
Output=The final resul is 35


Question3:
Function: curveup_list
You need to create a recursive function called curveup_list that will receive a list of integers, a length and integer interval. The function should increase each element of the array list by interval.
Example2: Example1:
List[ ] = 15, 24, 1, 6, 9, 7, 11, 1, 0, 5
Length=10, interval=1
Resul:
List[] =16, 25, 2, 7, 10, 8, 12, 2, 1, 6 List[ ] = 3, 7, 11, 1, 0
Length=5, interval=3
Resul:
List[] =6, 10, 14, 4, 3

Question4:
Write a program (main function) to test the three functions.
​
 
السلام عليكم
شخباركم
شوفوا ليي ذي الاسايمنت اش طول ياريت تساعدوني
لاني مو فاهم شي:sad_1:

Question1: Function: output_list
You need to create a recursive function called output_list that will create a list of integers based on the 3 parameters: start, end and interval. The function should generate a list of numbers starting with the number start, each successive number should be closer to the number end and the numbers should all be interval apart.
Example2: Example1:
Start=1, end=650, interval=100
The output: 1 101 201 301 401 501 601 Start=3, end=11, interval=2
The output: 3 5 7 9 11


Question2: Function: sum_list
You need to create a recursive function called sum_list that will return the sum of a list of integers based on the 3 parameters: start, end and interval.
Example2: Example1:
Start=1, end=650, interval=100
Result: 1+101+ 201+ 301+401+ 501+ 601
Output: 2107 Start=3, end=11, interval=2
Resul= 3+ 5 + 7+ 9+ 11
Output=The final resul is 35


Question3:
Function: curveup_list
You need to create a recursive function called curveup_list that will receive a list of integers, a length and integer interval. The function should increase each element of the array list by interval.
Example2: Example1:
List[ ] = 15, 24, 1, 6, 9, 7, 11, 1, 0, 5
Length=10, interval=1
Resul:
List[] =16, 25, 2, 7, 10, 8, 12, 2, 1, 6 List[ ] = 3, 7, 11, 1, 0
Length=5, interval=3
Resul:
List[] =6, 10, 14, 4, 3

Question4:
Write a program (main function) to test the three functions.
​

:nosweat: هذا السؤال تبع سكشنا للدكتور الجميل يوسف الجزيري مو !!!!

المهم اني ما حليته كامل لحد الحين متوهقة في الفنكشة الثانية و بمساعدة

سيد حسين ضبطو الأولى و الأخيرة :rolleyes2:

اول شي في المين

بتعرف لك الend,start,interval الي بتحتاجهم في الفنكشن الأولى و الثانية

و تعرف لك اري لأن تحتاجها للفنكشن الثالثة مع حجمها و تخلي اليوزر يدخل جميع القيم

و تحط كول لكل فنكشن و تطبعهم

اما بالنسبة للفنكشن الأولى

تسوي كوندشن بحيث انه اذا صارت خلاص تتوقف الفنكشن عن العمل

و اذا ما صار طبعا بتزيد الstart الا هي بتجمع عليها قيمة الانترفل

فلازم الكوندشن يتعلق بالend بحيث لين وصل ليها خلاص يوقف

:shiny: فكر فيه و جوف

الفنكشة الثانية نفس الشي بتسويه فيها بس الفرق ان بس يبيك ترجع

مجموع كل هذلين القيم

:confused: اني لحد الحين صايدني خلل فيها ,,, بس ان شاء الله بينحل اذا تبطل مخي :shiny:

الفنكشة الثالثة نفس عمل الفنكشة الأولى بالضبط بس الفرق ان هني الأرقام موجودين

داخل اري فالفرق انك بتمر داخلها باستخدام حجمها الي كل شوي بينقص كل ما ناديت

الفنكشن و كل ما ينقص يعني بمر على البوزشن الي قبل و لازم في نفس الوقت

تزيد على قيمة هذا البوزشن قيمة الانترفل و لازم في البداية تحط كوندشن توقف

الفنكشن .... بما انك بتمر مثلا من النهاية و كل شوي بتنقص السايز

اذا بتوقف اذا السايز صار 0

:icon30: حاول تحلها و بتجوف انها سهلة بس الفنكشن الثانية يبي ليها شوي تفكير

في الكوندشن
 
^^
تعااال صدق !! :shiny:
عدلت حل الفنكشن الثانية و نسيت أقول لش :mellow::shiny:
بطرش الطريقة في PM
:nosweat:​
 
عودة
أعلى أسفل