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

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

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

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

^^
لأن ستاتيك
 
class Rectangle
{
public:
Rectangle();
void setAll(float, float);
void getAll(float &, float &);
float area();
float perimeter();
private:
float length;
float width;
};
Write a non-member function named find-all-rec-Area that takes as parameters an array of
pointers to objects of type class Rectangle and the number of rectangles in the array (size).
The function should find and print the area of all rectangles in the array. Note: Assume all
member functions are implemented.
 
هلاااا
لو سمحتواا امبييي التوتريال مال عقب المدتيرم + الحل :rolleyes2:
 
منزله في المكتبة
 
كودات السيرج والسورت والشفت نسيتهم

ارجع احفظهم ؟

شكلي مابرجع لهم لان مو موجودين في النهائيات السابقة
 
Write a program that uses a dynamic two-dimensional array marks2d to store the marks of
quizzes (double) scored by many students (rows). The program should ask the user to enter
the number of students (rows) and enter the number of quizzes (columns). Then dynamically
create the two-dimensional array marks2d of size rows X columns. The program should ask
the user to enter the marks scored by each student in each quiz and find the student with
highest average mark.
Your input/output should be as follows:
Enter the number of students: 4
Enter the number of quizzes: 6
Enter the marks scored by student #1 in 6 quizzes
10 8 9.5 7 6 7.5
Enter the marks scored by student #2 in 6 quizzes
9.5 8.5 10 10 10 10
Enter the marks scored by student #3 in 6 quizzes
7 6 5 6 7 7
Enter the marks scored by student #4 in 6 quizzes
8 9 9 8.5 9.5 8.5
The student with the highest average mark is student# 2

عرفت احله لكن آخر خطوة ما عرفت اتذكر عطونا في المقرر القبلي اشلون انطلع هايست افرج بس نسيت
 
كودات السيرج والسورت والشفت نسيتهم

ارجع احفظهم ؟

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

اني درست مال المنتصف امس بس ما ركزت عليهم واجد مااتوقع ان يجيبون منهم
 
Write a program that uses a dynamic two-dimensional array marks2d to store the marks of
quizzes (double) scored by many students (rows). The program should ask the user to enter
the number of students (rows) and enter the number of quizzes (columns). Then dynamically
create the two-dimensional array marks2d of size rows X columns. The program should ask
the user to enter the marks scored by each student in each quiz and find the student with
highest average mark.
Your input/output should be as follows:
Enter the number of students: 4
Enter the number of quizzes: 6
Enter the marks scored by student #1 in 6 quizzes
10 8 9.5 7 6 7.5
Enter the marks scored by student #2 in 6 quizzes
9.5 8.5 10 10 10 10
Enter the marks scored by student #3 in 6 quizzes
7 6 5 6 7 7
Enter the marks scored by student #4 in 6 quizzes
8 9 9 8.5 9.5 8.5
The student with the highest average mark is student# 2

عرفت احله لكن آخر خطوة ما عرفت اتذكر عطونا في المقرر القبلي اشلون انطلع هايست افرج بس نسيت

توي مبدية فيـــــه اذا كملت بحط الحل >>>> مع اني اتوقع حلي غلط هع هع
 
احد عنده حل تمآرين التمبلت والاوفر لودنك سؤال 3 و 4 و 5
ابي الحل ؟!
 
عرفت احله لكن آخر خطوة ما عرفت اتذكر عطونا في المقرر القبلي اشلون انطلع هايست افرج بس نسيت

PHP:
[max=-3000;
maxpos=0;

for (int r=0; r<stcout; r++) 
{
int sum=0, c=0;

for (c=0; c<Qcout; c++){
sum+=M[0][c];
c++;
}

avg = sum/c;

if (avg>max)
{
max = avg;
maxpos = r;
}
}
cout<<"the student...."<<maxpos+1;



اني درست مال المنتصف امس بس ما ركزت عليهم واجد مااتوقع ان يجيبون منهم

ان شاءالله ماييبون منهم
 
اني درست مال المنتصف امس بس ما ركزت عليهم واجد مااتوقع ان يجيبون منهم

انآ توني من شوي قريتهم
مآ ادري بس كلش موب شآيفة شيء عليهم بالفاينل
يجون بسياق السؤال فقط
يا رب مآ ييون لانه مآ درسنآآهم عدل
 
مخي شكله شير
يلا جا دوركم
حلو هالسؤال
Consider the following definitions for class Rectangle:
class Rectangle
{
public:
Rectangle();
void setAll(float, float);
void getAll(float &, float &);
float area();
float perimeter();
private:
float length;
float width;
};
Write a non-member function named find-all-rec-Area that takes as parameters an array of
pointers to objects of type class Rectangle and the number of rectangles in the array (size).
The function should find and print the area of all rectangles in the array. Note: Assume all
member functions are implemented.
 
PHP:
[max=-3000;
maxpos=0;

for (int r=0; r<stcout; r++) 
{
int sum=0, c=0;

for (c=0; c<Qcout; c++){
sum+=M[0][c];
c++;
}

avg = sum/c;

if (avg>max)
{
max = avg;
maxpos = r;
}
}
cout<<"the student...."<<maxpos+1;





ان شاءالله ماييبون منهم

اذا ماعليك امـــر اشرح هالكـــــود مافهمت عليك
 
مخي شكله شير
يلا جا دوركم
حلو هالسؤال
Consider the following definitions for class Rectangle:
class Rectangle
{
public:
Rectangle();
void setAll(float, float);
void getAll(float &, float &);
float area();
float perimeter();
private:
float length;
float width;
};
Write a non-member function named find-all-rec-Area that takes as parameters an array of
pointers to objects of type class Rectangle and the number of rectangles in the array (size).
The function should find and print the area of all rectangles in the array. Note: Assume all
member functions are implemented.

رجعيــه مثل ماكان قبل 11ونص باجر هههههههههههههه
 
^^
عاد حزة الامتحان المخ ينقلب 180 درجة
يلا نسألكم الدعاء
 
تتوقعون الامتحان صعب؟؟ بما انه الميدتيرم كانت الدرجات نازلة ؟؟؟
 
يلا بحل ليكم سؤال عن template

Consider the class SType given below:
class SType
{ private:
int elements[100];
int size;
public:
SType();
void addtoEnd(int value);
int retrieveLastElement();
int getSize();
};
Part (A)
Rewrite the above class as a template class so that it becomes a SType of any type T (not just
of integers).

PHP:
template<class t>
class SType
{ private:
t elements[100];
int size;
public:
SType();
void addtoEnd(t value);
t retrieveLastElement();
int getSize();
};

Part (B)
Write the implementation of the addToEnd function that receives an element of any type and
inserts it as the last element of the array elements and increments the actual size of the array.
The function should check first to make sure that the actual size of the array will not exceed
100.

PHP:
template<class t>
void SType<t>::addtoEnd(t value)
{ if(size<100)
   { elements[size]=value;
     size++;}
}

Part (C)
1. Write a statement to define an object named students of type class SType, where the
elements will be of type long.
2. Write a statement to insert the value of 231546 to the object students defined above.

PHP:
int main()
{  SType<long> students;
   students.addtoEnd(231546);
}
 
جد عنده حل دي السؤال ؟ بليز


Question 4 (24 Points)
Consider the class TList given below:
class TList
{
private:
int * dynamicArr; //Pointer to a dynamic Array
int MaxSize; // Maximum Size of the dynamic array
int arrSize; // Actual Size of the dynamic array
public:
TList (int MaximumSize = 30);
void insertLast(int item) // Inserts item as the last
element in dynamicArr and increments arrSize
~ TList ();
}; // end class TList
(Part A) [6 Points]
Rewrite the above class as a template class so that it becomes a List of any type T (not just of
integers).
(Part B)[4 Points]
Write the implementation of the constructor function that initializes MaxSize to the value of
the parameter MaximumSize, initializes ArrSize to 0 and creates the
dynamic array dynamicArr of the given MaxSize.
Page 6 of 9
Question (4) Continue
(Part C)[4 Points]
Write the implementation of the destructor function.
(Part D)[6 Points]
Write the implementation of the insertLast function that receives an item of any type and
inserts it as the last element of the array dynamicArr and increments the
actual size of the array. The function should check first to
make sure that the actual size of the array will not exceed
the maximum size allowed.
(Part E)[4 Points]
1. Write a statement to define an object named myGrades of type class TList, where the
list will be of type double, and its maximum size is 50.
2. Write a statement to insert the value of 52.5 to the list myGrades defined above.
3. Write a statement to define an object named myNames of type class TList, where the
list will be of type String, and its maximum size is 20.
4. Write a statement to insert the name Ahmad to the list myNames defined above.
 
لاحظت ان الستركجر ماليه وجود في الفاينلات
 
عودة
أعلى أسفل