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

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

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

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

محاضره اليوم

[IMGL]https://www.uob-bh.com/upload/up_live/12881780261.jpg[/IMGL]

[IMGL]https://www.uob-bh.com/upload/up_live/12881780272.jpg[/IMGL]

[IMGL]https://www.uob-bh.com/upload/up_live/12881780273.jpg[/IMGL]

[IMGL]https://www.uob-bh.com/upload/up_live/12881780274.jpg[/IMGL]

[IMGL]https://www.uob-bh.com/upload/up_live/12881780275.jpg[/IMGL]

[IMGL]https://www.uob-bh.com/upload/up_live/12881782021.jpg[/IMGL]
 
مرحبـآآ..

شحـآلكم؟


عندي سؤآل عـآلـستركجر.. حـآولت و حليته بس فيه ErrorS..

Let a structure called Student with the following data members:
section (string), sid(long), fName (string), lName (string), dob(DateOfBirth), marks an array of maximum 5 floats, and average, a float that will contains the average of the 5 marks.
The user defined type DateOfBirth is a structure with data members such as day, month, and year all of type int.


1. Define the two structures Student and DateOfBirth.

2. Write a function called readStudent that receives one parameter of type Student and prompt the user to read all the information in a formatted way.

3. Write a function called displayStudent that receives the Student structure as a parameter and display all his/her information in a formatted manner.

4. Write a function called averageMark that receives one parameter of type Student and sets the average of the 5 marks.


5. Write a function called bestStudent that receives an array of Students and its size, and returns the index (position in the array) of the student who got the highest average. This function makes use of the function averageMark.


6. In the main function:
a. Declare an array of maximum 100 students of type Student called itcs102
b. In a loop, enter the details of 10 students. (call readStudent inside the loop).
c. Call displayStudent to display the array in a formatted way. (call displayStudent inside the loop).
d. Call bestStudent to find out the index of the best student. (you will have to save the index) and call displayStudent to display his/her details.​
مآ أبي أحط آلـحل يمكن أحد يآخذه..
بس آلـ ErrorS آللي عندي في رقم 5، و 6 في d مو عآرفه أعدلهم..
في أحد ممكن أرسل له آلحل يجيك لي؟

مي 2 عندي فيه 1 error بس !
ان شاء الله أقدر احله :smile:
 
في الصفحة الثالثة اني اقصد بال<<" " يعني نحط endl; او نحط المسافة عشا ما يتلاصقون القيم مع بعض

و في الصفة الرابعة ...

الطريقة الثانية للفنكشن اقصد ان نكتب كل الكوندشن داخل الاف ستيتمنت + اول شي return true

بعدين else بعدين return false
 
مشكورين جميعاً
 
تم انشاء مجموعة خاصة بالسكشن مالنا :shiny:

اتمنى من كل الي يحضرون يشتركون فيها عشان يقدرون يجوفون الأخبار اول بأول

https://www.uob-bh.com/forum/group.php?groupid=2

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

اليوم اول مرة احضر

ما شاء الله شرحش واااو ماعليه كلام احسن من شرح الدكتور بمراحل

لو انتي دكتورة اخذت وياش السي اس اللي عقب بدووون تردد

حسافة ما اقدر احضر وياش على طوول جان زين يو تي السكشن

بالتوفيق جميعااا
 
:shiny: بننتظر لين شوي يزيد العدد و بنسوي في المجموعة اشياءات ...

-------------------

سيسبانة

:RpS_tongue: المشكلة اني مو دكتورة له ههههه

:RpS_sleep: المدير بجوف لينا طريقة عشان نسوي استطلاع عن الي يبي بعدين محاضرات و بنبدأ بيوم الاثنين الجاي

و بالنسبة للUTH المشكلة اني وااااجد مضغوطة و كل يوم عندي فيه لاب و ما في ولا بريك عندي

بس هالاسبوع يوم واحد مكنسلين الاب ماله فصعب واجد
 
^^^^^

الله يعينش الابات يخربون الجدول فوق تحت:RpS_glare:

بتابع وياكم من النوتات اللي تخلونها:shiny:
 
انا الثامن:smile:​
 
السلام عليكم ..

شباب اللي في سكشن 1 ويا نصر الدين ! :nosweat:

من عنده سؤال الاساينمنت ؟؟ اللي عنده يحطه بليز لان عندي السولوشن وابي احاول احله بروحي !:blushing:
 
بس شباب مشكورين حليت السؤال ! :nosweat:

have a nice weekend everyone:shiny:
 
السلام عليكم يا حلوين بس عندي سؤال بسيط ضايعة فيه


و هذا البرنامج اللي سويته لســؤال الدكتورة قالت لنه Home assignment بس مو راضي يطلع لي السؤال في الموقع فمــراح اقدر احط السؤال بــس عندي استفسار بسيط في جزئية معينة شارحه لكم شنو يبون في الكوود ... انا سويت البرنامج كامل بس يطلع لي Error مو عارفة وين المشكلة



تفضلووو الكووود



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

class MenuType {

private:
	string ItemName;
	float ItemPrice;
	string ItemType;

public:
	void SetItem (string , float , string );
	void GetItem (string & , float & , string & );
	void IncreasePrice (float);
	void showMenu ();
	MenuType (string=" " , float=0 , string=" " );
	bool SameValue (MenuType other);
	~MenuType ();


};

void MenuType :: SetItem ( string X, float Y, string Z) {
	ItemName=X;
	ItemPrice=Y;
	ItemType=Z;
}


void MenuType :: GetItem (string & X, float & Y, string & Z){
	X=ItemName;
	Y=ItemPrice;
	Z=ItemType;
}

void MenuType :: IncreasePrice (float y){

	ItemPrice+= y;
}

void MenuType :: showMenu (){
	cout<<ItemName<< " " <<ItemPrice<< " " <<ItemType<<endl;
}

MenuType :: MenuType (string A , float B , string C ){
	SetItem(A,B,C);
}

bool MenuType :: SameValue (MenuType other){
	if(ItemPrice==other.ItemPrice)
		return true;
	else 
		return false;
		
}
	
MenuType :: ~MenuType  (){
	cout<<"Object has been deleted";
}

int main (){
	MenuType MenuList[50];
    string x;
	float y;
	string z;
	int i;

	cout<<" Pleas Enter 4 objects";
	for(i=0;i<4;i++)
	{
	cin>>x>>y>>z;
	MenuList[i].SetItem (x,y,z);
	}
	
	for (i=0;i<4;i++){

	 MenuList[i].GetItem (x,y,z);
	 if (z=="lunch")
	 MenuList[i].showMenu ();

	}

//اهني السؤال يبون نسوي مقارنة بين آيتم برايس مع آيتم برايس ثانية في الاري 
//و اذا يساوون بعض نطبع مسج انه اهمه متساوين و اذا مو متساوين نطبع مو متساوين

	MenuList[0].SameValue.MenuList[1]

			cout<<" they are equal ";
		else
			cout<<" they are not equal"
		

	for(int i=0;i<=50;i++){
		MenuList[i].showMenu();
		
	}
}

اتمنى تساعدووني :tears:​
 
عودة
أعلى أسفل