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

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

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

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

" no problem " << :rolleyes2:
المفروض في موضوع فيه قوانين .. :whistling:

حتى لو صار موضوع فيه قوانين
منو من الاعضاء بفكر يفتحه ؟ ^^"
لازم شي تنبيه قدام الأعضاء بالقسم
عموماً بنقل الفكرة لقسم المشرفين
شكراً ..
 
لا تحطون الكود للأسايمنت كاااامل عشان جهدكم لا يُقتبس
هذا لا شيء ، المشكلة في تطابق الكود
أتذكر لما أخذت المقرر في المختبر
وضعت درجات الواجب (Assignment)
مجموعة من الطلاب درجتهم صفر مع خلفية صفراء
و كانوا عشرة طلاب نفس البرنامج
حتى مدرسة المختبر قالت : هذا وزع الكود على كل الجامعة
تعني من كتب الكود و وزعه
أنا لا أعترض عن نشر الكود
لكن أعترض على النسخ الأعمى
 
write function sort that use bubble sort the message according to their size:
void buublesort Email (Email mailBox[], int size);

write function search th that returns true if (T0 person) equals yo "To" in mail box:
bool searchTo(Email mailBox[],int size,string Toperson);

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


؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
 
؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟

السؤال الأول :-
طالب ترتيب العناصر حسب الحجم اللي محطوط داخل كل "
class "
بنستخدم الدالة "
get " إذا كانت موجوده عشان نطلع الحجم من الكلاس .. بعدين نقارن بينهم ونرتبهم
بيكون مثل التالي ..


كود:
Email temp;
    for(int i=0 ; i<size-1 ; i++)
    {
        for(int j=i+1 ; j<size; j++)
        {
            int zi,zj;
            mailBox[i].getsize(zi);
            mailBox[j].getsize(zj);
            if(zi>zj)
            {
                temp=mailBox[i];
                mailBox[i]=mailBox[j];
                mailBox[j]=temp;
            }
        }
    }

السؤال الثاني :-
نسوي فور لوب وحده .. مثل السؤال اللي قبل نستخدم الدالة "
get " عشان نجيب الـ " TO " اللي داخل الكلاس
بعدين نقارنها بـ "
Toperson " إذا كانوا متساوين يرجع قيمة " true "
وإذا خلص وما حصل حاجه يرجع قيمة "
false "

وهذا مثال ..

كود:
for(int i=0 ; i<size ; i++)
    {
        string to;
        mailBox[i].getTo(to);
        if(to==Toperson)
            return true;
    }
    return false;
 
السؤال الأول :-
طالب ترتيب العناصر حسب الحجم اللي محطوط داخل كل "
class "
بنستخدم الدالة "
get " إذا كانت موجوده عشان نطلع الحجم من الكلاس .. بعدين نقارن بينهم ونرتبهم
بيكون مثل التالي ..


كود:
Email temp;
    for(int i=0 ; i<size-1 ; i++)
    {
        for(int j=i+1 ; j<size; j++)
        {
            int zi,zj;
            mailBox[i].getsize(zi);
            mailBox[j].getsize(zj);
            if(zi>zj)
            {
                temp=mailBox[i];
                mailBox[i]=mailBox[j];
                mailBox[j]=temp;
            }
        }
    }

السؤال الثاني :-
نسوي فور لوب وحده .. مثل السؤال اللي قبل نستخدم الدالة "
get " عشان نجيب الـ " TO " اللي داخل الكلاس
بعدين نقارنها بـ "
Toperson " إذا كانوا متساوين يرجع قيمة " true "
وإذا خلص وما حصل حاجه يرجع قيمة "
false "

وهذا مثال ..

كود:
for(int i=0 ; i<size ; i++)
    {
        string to;
        mailBox[i].getTo(to);
        if(to==Toperson)
            return true;
    }
    return false;

شكرا ما قصرت:shiny:
 
(1) Complete the class defined in the previous exercise to include the following functions:


• Withdraw function which is used to withdraw a certain amount X from the Account. It should check that the balance in the account is at least equal to X (ie X or more) before it allows the withdrawal and reduce the Balance by X.
• Deposit which is used to Deposit a certain amount Y into the Account. It should of course increase the Balance by Y.
• IsAccountEmpty which returns true if the Balance is less than or equal to zero. Otherwise it returns false.


(2) Write a main function to test your class as follow:


- Write one statement to define an array named AccountList with size 300 that contains objects of class BankAccount.


- Write statements to print on the screen all the empty Accounts in AccountList (that have a balance of zero or less). Assume that the list length is 100.

السلام عليكم ممكن شرح هذا بتفصيل لو سمحتوووووووووووووووووووووووووووووووووا
 
(1) Complete the class defined in the previous exercise to include the following functions:


• Withdraw function which is used to withdraw a certain amount X from the Account. It should check that the balance in the account is at least equal to X (ie X or more) before it allows the withdrawal and reduce the Balance by X.
• Deposit which is used to Deposit a certain amount Y into the Account. It should of course increase the Balance by Y.
• IsAccountEmpty which returns true if the Balance is less than or equal to zero. Otherwise it returns false.


(2) Write a main function to test your class as follow:


- Write one statement to define an array named AccountList with size 300 that contains objects of class BankAccount.


- Write statements to print on the screen all the empty Accounts in AccountList (that have a balance of zero or less). Assume that the list length is 100.

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

بارت 2
* مطلوب اضيفين 3 فنكشنات
الأولى: فنكشن تستخددم عشان تنقص قيمة المبلغ الأصلي من المبلغ الي يتحدد عشان ينسحب
فبتجيك ان في الأكاونت قد المبلغ الي بتسحبه أو أكثر قبل السحب
الثانية: اهني يزيد قيمة المبلغ الموجودة بالمبلغ الي بيدخله صاحب الأكاونت
في الفنكشنتين بنحتاج قيمة السحب أو قيمة الايداع و أتوقع يكونون براميتر
الثالثة: اتجيك الحساب فيه مبلغ او لا
* في المين ديفايند أري حجمه 300 فيه أوبجكت من نوع الكلاس الي عندنا
BankAccount AccountList[300];
بكون في هذا الكلاس كل جزء منه أوبجكت .. الأوبجكت فيه كل القيم الأساسية الي في البرايفت
* بما إن عندنا أري بنحتاج فور لوب
داخله اف ستيتمنت حسب الموجود بالسؤال
اذا اتحقق الشرط بسوي كول فنكشن الى البرنت
تطبع قيم الآي الي تحقق عندها الشرط " الأوبجكت"
AccountList.print();
أي استفسار ثاني حاضرين
و طبعاً الأقواس تعرفون ليهم شلون طريقتهم
بس بالمنتدى يطلعون بهالطريقة ما ادري ليش
احتمال من المتصفح عندي ^^"


اذا محتاجة تفصيل اكثر لا يردش الا الكيبورد :smile2:
 
(1) Complete the class defined in the previous exercise to include the following functions:


• Withdraw function which is used to withdraw a certain amount X from the Account. It should check that the balance in the account is at least equal to X (ie X or more) before it allows the withdrawal and reduce the Balance by X.
• Deposit which is used to Deposit a certain amount Y into the Account. It should of course increase the Balance by Y.
• IsAccountEmpty which returns true if the Balance is less than or equal to zero. Otherwise it returns false.


(2) Write a main function to test your class as follow:


- Write one statement to define an array named AccountList with size 300 that contains objects of class BankAccount.


- Write statements to print on the screen all the empty Accounts in AccountList (that have a balance of zero or less). Assume that the list length is 100.

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

بارت 2
* مطلوب اضيفين 3 فنكشنات
الأولى: فنكشن تستخددم عشان تنقص قيمة المبلغ الأصلي من المبلغ الي يتحدد عشان ينسحب
فبتجيك ان في الأكاونت قد المبلغ الي بتسحبه أو أكثر قبل السحب
الثانية: اهني يزيد قيمة المبلغ الموجودة بالمبلغ الي بيدخله صاحب الأكاونت
في الفنكشنتين بنحتاج قيمة السحب أو قيمة الايداع و أتوقع يكونون براميتر
الثالثة: اتجيك الحساب فيه مبلغ او لا
* في المين ديفايند أري حجمه 300 فيه أوبجكت من نوع الكلاس الي عندنا
BankAccount AccountList[300];
بكون في هذا الكلاس كل جزء منه أوبجكت .. الأوبجكت فيه كل القيم الأساسية الي في البرايفت
* بما إن عندنا أري بنحتاج فور لوب
داخله اف ستيتمنت حسب الموجود بالسؤال
اذا اتحقق الشرط بسوي كول فنكشن الى البرنت
تطبع قيم الآي الي تحقق عندها الشرط " الأوبجكت"
AccountList.print();
أي استفسار ثاني حاضرين
و طبعاً الأقواس تعرفون ليهم شلون طريقتهم
بس بالمنتدى يطلعون بهالطريقة ما ادري ليش
احتمال من المتصفح عندي ^^"


اذا محتاجة تفصيل اكثر لا يردش الا الكيبورد :smile2:
 
(1) Complete the class defined in the previous exercise to include the following functions:


• Withdraw function which is used to withdraw a certain amount X from the Account. It should check that the balance in the account is at least equal to X (ie X or more) before it allows the withdrawal and reduce the Balance by X.
• Deposit which is used to Deposit a certain amount Y into the Account. It should of course increase the Balance by Y.
• IsAccountEmpty which returns true if the Balance is less than or equal to zero. Otherwise it returns false.


(2) Write a main function to test your class as follow:


- Write one statement to define an array named AccountList with size 300 that contains objects of class BankAccount.


- Write statements to print on the screen all the empty Accounts in AccountList (that have a balance of zero or less). Assume that the list length is 100.

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

القسم الأول :-
1- دالة أسمها "
Withdraw " تنقص من الـ " balance " بمقدار " x " وقبل ما تنقص تتحقق أن إذا ما كان المقدار أكبر من " balance " أو لا عشان ما يصير بالسالب ..
2- دالة "
Deposit " تزيد الـ " balance " بمقدار " y "

القسم الثاني :-
1- تعرف "
AccountList " كمصفوفة حجمها 300 من نوع الكلس اللي مسونه << تصير جذي .. " [BankAccount AccountList [300 "
2- نستخدم فور لوب تتكرر
100 مرة .. داخل اللوب نستخدم الدالة " get " عشان نطلع الـ " balance " ..
بعدين نسوي أوت بوت لكل اكونت يكون البلنس ماله "
0 " أو اقل

كود:
for (int i=0;i<100;i++)
	{
		AccountList[i].get(a,n,b);
		if (b<=0)
			AccountList[i].DisplayAccountDetails();
	}
 
:smile2::smile2::smile2::smile2:
شكرررررررررررررررررررررررررررررررررا​
 
Create a program that
1- Declare SavingAccounts as an array of 7 objects of BankAccount.
2- Read the details of SavingAccounts from file ”savings.dat”.
3- Write a function that uses bubble sort to sort SavingAccounts according to balance.
4- Print details of SavingAccounts on screen after sorting.​

ممكن تشرحون هاذي الجزئية بالتفصيل الممل
 
1- Declare SavingAccounts as an array of 7 objects of BankAccount.
مجرّد تعريف
PHP:
BankAccount SavingAccounts[7];
- Read the details of SavingAccounts from file ”savings.dat”.
تاخذ البيانات من ملف "saveings.dat" و تستخدم هذه الأشياء في برنامج
PHP:
#include<fstream>
int main(){
ifstream inputfile;
inputfile.open("saveings.dat");
inputfile.close();
}
- Write a function that uses bubble sort to sort SavingAccounts according to balance.
تسوي function ترتب الـ balance من الصغير إلى الكبير

- Print details of SavingAccounts on screen after sorting.
مجرّد أستدعاء لـ function الـ Display علشان تطلّع كل البيانات من بعدما تم تعديل ترتيب البيانات
​
 
A class called (BankAccount) which has 3 private members ( AccountNumber
(long), Name (string), and Balance (float)


In MAIN program we declared SavingAccounts as an array of 7 objects of BankAccount

PHP:
BankAccount SavingAccounts[7];
The question here is how to write a function that uses bubble sort to sort SavingAccounts according to balance.

I think the prototype for the function is

PHP:
 void bubblesort (BankAccount list[],int length)

HELP ME PLZ
​
 
عندي استفسارين :-

1- تتوقعون التست فيه أسئلة فايل ؟ .. لأن ما اتذكر هالدرس من زمان ماخذه 103 :nosweat:
2- المخطط للفنكشن او للبرنامج الي نرسمه .. يجيبون مثل هالسؤال ؟ .. على دفعتنا قبل ما فيه هالاختراع
 
عندي استفسارين :-

1- تتوقعون التست فيه أسئلة فايل ؟ .. لأن ما اتذكر هالدرس من زمان ماخذه 103 :nosweat:
2- المخطط للفنكشن او للبرنامج الي نرسمه .. يجيبون مثل هالسؤال ؟ .. على دفعتنا قبل ما فيه هالاختراع

- إحتمال كبير عشان يعقدون السالفة علينا .. << يحلمون :sly:
-
يمكن تقصدون " flowchart " إحتمال 90% يجيبونه بس مو متأكد :rolleyes2:
 
A class called (BankAccount) which has 3 private members ( AccountNumber
(long), Name (string), and Balance (float)


In MAIN program we declared SavingAccounts as an array of 7 objects of BankAccount

PHP:
BankAccount SavingAccounts[7];
The question here is how to write a function that uses bubble sort to sort SavingAccounts according to balance.

I think the prototype for the function is

PHP:
 void bubblesort (BankAccount list[],int length)

HELP ME PLZ
​

هذ الطريقة للسورت ..

كود:
BankAccount temp;
    for(int i=0 ; i<size-1 ; i++)
    {
        for(int j=i+1 ; j<size; j++)
        {
            int zi,zj;
            SavingAccounts[i].getbalance(zi);
            SavingAccounts[j].getbalance(zj);
            if(zi>zj)
            {
                temp=SavingAccounts[i];
                SavingAccounts[i]=SavingAccounts[j];
                SavingAccounts[j]=temp;
            }
        }
    }

مجرد فهم + تطبيق .. :smile2:
 
بالنسبة للفلوجارت الدكتورة قالت مطلوب ويانا ..
عطتنا بعد فلوجارت للـ selection sort وبعد شي ماتذكر وش هو :nosweat:
 
عودة
أعلى أسفل