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

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

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

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

يسلموووو

يعطيكم العافية ,, ان شاء الله بغير بعض الاشياء لان مثل ما قلت في ناس تخبر الدكتورة وكذا مرة تتكلم عن الكوبي والبست
 
ممكن احد يشرح البوينتر من البداية فر راسي شوي *_*
 
سكشن 01 دكتورة امل
من حضر اليوم
شرحت الدكتورة او لا
 
سكشن 9

وزعت الدكتورة اوراق المدتيرم لو لا
 
  • Like
التفاعلات: the
حليت سؤال و أبي أعرف إذا صح ولا لا!!

Write the definition of a class named BankAccount. The data members of the class BankAccount are: AccountNumber (long), Name (string), and Balance (float). In addition, the class BankAccount contains the following member functions:



  1. Set function, Get function, for all members.
  2. 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 (i.e. X or more) before it allows the withdrawal and reduce the Balance by X.
  3. Deposit which is used to Deposit a certain amount Y into the Account. It should of course increase the Balance by Y.

  1. DisplayAccountDetails that prints (on the screen) all the information about the Account.


write a main program to do the following:
Ø Declare SavingBankAccount as an array of 5 of type BankAccount.
Ø Ask the user to enter the data of 5 accounts and set all members of SavingBankAccount.
Ø Deposit in each account of SavingBankAccounts 100BD.
Ø Withdraw from element 2 and 3 30BD.
Ø Display all accounts on screen.


HTML:
#include <iostream> #include <string> using namespace std; 




void BankAccount::set(long , string, flout){     AccountNumber=AN;     Name=N;     Balance=B;     }          
void BankAccount::get( long , string, flout){   AN=AccountNumber;   N=Name;   B=BAlance;   }

             float BankAccount::Withdrawl(float WDrawl){    cout<<"Enter An Amount To Withdrawl: ";    cin>>WDrawl;    while(WDrawl>Balance)    {        cout<<"Sorry, Your Account Balance Is Not That Much!!\n";        cout<<"Enter An Amount To Withdrawl: ";            cin>>WDrawl;            }

    Balance=Balance-WDrawl;    return Balance;}  

float BankAccount::float Deposite(float DepositeAmount){    cout<<"Enter An Amount TO Deposite: ";    cin>>DepositeAmount;    while(DepositeAmount=0 || DepositeAmount<0)    {        cout<<"Error, invallid amount!!\n";        cout<<"Please enter an amount to deposite again: ";        cin>>DepositeAmount;    }            Balance=Balance+DepositeAmount;    return Balance;}  


bool IsAccountEmpty(float Balance){    if(Balance=0 || Balance<0)        return true;
    else        return false;
}  

void DisplayAccountDetails(){      cout<<"The acount number is:"<<AN<<endl<<"for the name"<<N<<endl<<"Which have the balance"<<B<<endl;     }
int main()
class BankAccount{      privete:              long AccountNumber;              string Name;              flout Balance;public:    void set(long , string, flout);    void get( long , string, flout);       float Withdrawl(float WDrawl);      float Deposite(float DepositeAmount);    void DisplayAccountDetails();      BankAccount  SavingBankAccount[5];};
{
myAccount.set();herAccount.set();hisAccount.set();ourAccount.set();MYAccount.set();
myAccount.Deposite(100.0);herAccount.Deposite(100.0);hisAccount.Deposite(100.0);ourAccount.Deposite(100.0);MYAccount.Deposite(100.0);
herAccount.Withdrawl(30.0);hisAccount.Withdrawl(30.0);
myAccount.DisplayAccountDetails();herAccount.DisplayAccountDetails();hisAccount.DisplayAccountDetails();ourAccount.DisplayAccountDetails();MYAccount.DisplayAccountDetails();

};



:no::sly::no:​
 
سكشن دكتورة امل في احد حل الهوم اسايمنت مال الclass في المين يطلع لي اخطاء ماعرف اعدلها :tears:
 
حليت سؤال و أبي أعرف إذا صح ولا لا!!

Write the definition of a class named BankAccount. The data members of the class BankAccount are: AccountNumber (long), Name (string), and Balance (float). In addition, the class BankAccount contains the following member functions:



  1. Set function, Get function, for all members.
  2. 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 (i.e. X or more) before it allows the withdrawal and reduce the Balance by X.
  3. Deposit which is used to Deposit a certain amount Y into the Account. It should of course increase the Balance by Y.

  1. DisplayAccountDetails that prints (on the screen) all the information about the Account.


write a main program to do the following:
Ø Declare SavingBankAccount as an array of 5 of type BankAccount.
Ø Ask the user to enter the data of 5 accounts and set all members of SavingBankAccount.
Ø Deposit in each account of SavingBankAccounts 100BD.
Ø Withdraw from element 2 and 3 30BD.
Ø Display all accounts on screen.


HTML:
#include <iostream> #include <string> using namespace std; 




void BankAccount::set(long , string, flout){     AccountNumber=AN;     Name=N;     Balance=B;     }          
void BankAccount::get( long , string, flout){   AN=AccountNumber;   N=Name;   B=BAlance;   }

             float BankAccount::Withdrawl(float WDrawl){    cout<<"Enter An Amount To Withdrawl: ";    cin>>WDrawl;    while(WDrawl>Balance)    {        cout<<"Sorry, Your Account Balance Is Not That Much!!\n";        cout<<"Enter An Amount To Withdrawl: ";            cin>>WDrawl;            }

    Balance=Balance-WDrawl;    return Balance;}  

float BankAccount::float Deposite(float DepositeAmount){    cout<<"Enter An Amount TO Deposite: ";    cin>>DepositeAmount;    while(DepositeAmount=0 || DepositeAmount<0)    {        cout<<"Error, invallid amount!!\n";        cout<<"Please enter an amount to deposite again: ";        cin>>DepositeAmount;    }            Balance=Balance+DepositeAmount;    return Balance;}  


bool IsAccountEmpty(float Balance){    if(Balance=0 || Balance<0)        return true;
    else        return false;
}  

void DisplayAccountDetails(){      cout<<"The acount number is:"<<AN<<endl<<"for the name"<<N<<endl<<"Which have the balance"<<B<<endl;     }
int main()
class BankAccount{      privete:              long AccountNumber;              string Name;              flout Balance;public:    void set(long , string, flout);    void get( long , string, flout);       float Withdrawl(float WDrawl);      float Deposite(float DepositeAmount);    void DisplayAccountDetails();      BankAccount  SavingBankAccount[5];};
{
myAccount.set();herAccount.set();hisAccount.set();ourAccount.set();MYAccount.set();
myAccount.Deposite(100.0);herAccount.Deposite(100.0);hisAccount.Deposite(100.0);ourAccount.Deposite(100.0);MYAccount.Deposite(100.0);
herAccount.Withdrawl(30.0);hisAccount.Withdrawl(30.0);
myAccount.DisplayAccountDetails();herAccount.DisplayAccountDetails();hisAccount.DisplayAccountDetails();ourAccount.DisplayAccountDetails();MYAccount.DisplayAccountDetails();

};



:no::sly::no:​
الحل شوي محطوط مخربط، الأسطر داشة في بعض فما قدرت اشوفه عدل
تقدرين تقارنين حلج مع هذا الحل
https://www.uob-bh.com/forum/showthread.php?t=29349&p=633437&viewfull=1#post633437
 
السلام عليكم
بغيت مساعدتكم ضروري في حل الاسايمنت
هذا هو السؤال وارجو منكم المساعدة العاجلة




PART(A)
Implement a class named carType. The classincludes the following data members: model( of type string), price(oftype float).
And the following public member's functions:
1) A set function to all data members of the object.
2) A get function to return all data members of theobject.
3) A function display to display the model and price ofthe object.
4) A destructor todisplay a message “Item deleted”


PART(B)
Write a function named cheapestItem that takes asparamaters: an array of type carType and the number of cars in the array. The function shouldreturn the position of the cheapest car in the array (i.e the car with the lowestprice). The function prototype is:
int cheapestItem (carType list[ ], int size)

PART(C)
Write a mainprogram to test your functions​
 
أحد يحل هذا الاسايمنت متوهق فيه

PHP:
Using the following class definition of a Table.
class Table {
private:
int NRS;
int NCS;
double **Mat;
 
public:
Table(int =10,int=10); 
Table(const Table& m);
void inputTable();
void printTable();
void swapRows(int,int)
~Table();
};
A) Implement the:
Default constructor that initialize the Number of rows and the Number of columns by the received values, create dynamically the Table (NRS X NCS) and initialize all it elements to zeros.Copy constructor of the class Table that create dynamically the Table (NRS X NRS) and initialize it by the received Table (use deep copy).printTable() that display each raw of the object in a line.inputTable() that read  NRSXNRS integers and store them in the Table.swapRows(int I,int J) that swap the row I with the row J. NRSXNRS integers and store them in the Table.Destructor that delete the allocated memory. 
B) Write a main function that do the following:
Create one object called Mat1 with 5x5.input 25 integer and store them in Mat1.Create another object called Mat2 and initialize it by Mat1. Swap row 2 with row 4 of the table in Mat2.Display Mat1 and Mat2.
 
السلام عليكم
بغيت مساعدتكم ضروري في حل الاسايمنت
هذا هو السؤال وارجو منكم المساعدة العاجلة

PART(A)
Implement a class named carType. The classincludes the following data members: model( of type string), price(oftype float).
And the following public member's functions:
1) A set function to all data members of the object.
2) A get function to return all data members of theobject.
3) A function display to display the model and price ofthe object.
4) A destructor todisplay a message “Item deleted”


PART(B)
Write a function named cheapestItem that takes asparamaters: an array of type carType and the number of cars in the array. The function shouldreturn the position of the cheapest car in the array (i.e the car with the lowestprice). The function prototype is:
int cheapestItem (carType list[ ], int size)

PART(C)
Write a mainprogram to test your functions



أحد يحل هذا الاسايمنت متوهق فيه

PHP:
Using the following class definition of a Table.
class Table {
private:
int NRS;
int NCS;
double **Mat;
 
public:
Table(int =10,int=10); 
Table(const Table& m);
void inputTable();
void printTable();
void swapRows(int,int)
~Table();
};
A) Implement the:
Default constructor that initialize the Number of rows and the Number of columns by the received values, create dynamically the Table (NRS X NCS) and initialize all it elements to zeros.Copy constructor of the class Table that create dynamically the Table (NRS X NRS) and initialize it by the received Table (use deep copy).printTable() that display each raw of the object in a line.inputTable() that read  NRSXNRS integers and store them in the Table.swapRows(int I,int J) that swap the row I with the row J. NRSXNRS integers and store them in the Table.Destructor that delete the allocated memory. 
B) Write a main function that do the following:
Create one object called Mat1 with 5x5.input 25 integer and store them in Mat1.Create another object called Mat2 and initialize it by Mat1. Swap row 2 with row 4 of the table in Mat2.Display Mat1 and Mat2.



كتبوا محاولاتكم في حل السؤال وبجاوبه وياكم :smile2:
​
 
السلام عليكم
بغيت مساعدتكم ضروري في حل الاسايمنت
هذا هو السؤال وارجو منكم المساعدة العاجلة




PART(A)
Implement a class named carType. The classincludes the following data members: model( of type string), price(oftype float).
And the following public member's functions:
1) A set function to all data members of the object.
2) A get function to return all data members of theobject.
3) A function display to display the model and price ofthe object.
4) A destructor todisplay a message “Item deleted”

PART(B)
Write a function named cheapestItem that takes asparamaters: an array of type carType and the number of cars in the array. The function shouldreturn the position of the cheapest car in the array (i.e the car with the lowestprice). The function prototype is:
int cheapestItem (carType list[ ], int size)

PART(C)
Write a mainprogram to test your functions
​


هلا
لضيق الوقت .. بجاوب جزء واحد
Part A
احس مافيه ولاشي صعب ، يعني مجرد function اساسية في Class
مافي شي صعب ان شاء الله

part B
بجاوبه
PHP:
     int cheapestItem(carType list[], int size)
                 {   string M1; float P1,P2; int loc=0;
                     list[0].getData(M1,P2);
                     for(int i=1 ; i<size ;i++){
                     list[i].getData(M1,P1);
                     if(P1<P2){
                     P2=P1;
                     loc = i;}
                     }
                     return loc;
                     
                     }
 
السلام عليكم
رحم الله والديكم ، بغيت مساعدة في هالاسايمنت ،، على الاقل بس اشرحووه ليي ، بليز ، تعبانة نفسيا من هالسي اس وهالدكتووورة :RpS_crying:


Using the following class definition of a Table.
class Table {
private:
int NRS;
int NCS;
double **Mat;

public:
Table(int =10,int=10);
Table(const Table& m);
void inputTable();
void printTable();
void swapRows(int,int)
~Table();
};
A) Implement the:

  1. Default constructor that initialize the Number of rows and the Number of columns by the received values, create dynamically the Table (NRS X NCS) and initialize all it elements to zeros.

  1. Copy constructor of the class Table that create dynamically the Table (NRS X NRS) and initialize it by the received Table (use deep copy).

  1. printTable() that display each raw of the object in a line.

  1. inputTable() that read NRSXNRS integers and store them in the Table.

  1. swapRows(int I,int J) that swap the row I with the row J. NRSXNRS integers and store them in the Table.

  1. Destructor that delete the allocated memory.

B) Write a main function that do the following:

  1. Create one object called Mat1 with 5x5.

  1. input 25 integer and store them in Mat1.

  1. Create another object called Mat2 and initialize it by Mat1.

  1. Swap row 2 with row 4 of the table in Mat2.
<>5.Display Mat1 and Mat2
​
 
Default constructor that initialize the Number of rows and the Number of columns by the received values, create dynamically the Table (NRS X NCS) and initialize all it elements to zeros:
محاولتي في هالسؤااال :

Table::Table(int = 10, int = 10){
for(int i=0;i<NRS;i++)
for(int j=0;j<NCS;j++)
Mat[j]=0;
​
 
انه بعد بغيت حل الاسايمنت ضروري

اخر يوم للتسليم اليوم ...
 
انا بعد بغيت حل الاسايمنت للي يعرفون بليز ساعدونا :RpS_crying:
 
عودة
أعلى أسفل