مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
السلام عليكم
عساك على القوة اخوي....وانشالله ربي يوفقك
بس ماعليك امر اخوي...ما ادري اذا كان لي الشرف انك تتكرم وتساعدني في هالسؤال
واعتذر ان سببت اي ازعاج
وتسلم يالغالي
Write a program that has the following:
Class declaration of IntegerSet that has array of integers, with the functions:
InsertElement , DeleteElement, and PrintSet as member functions, as stated in the exercise. Both InsertElement and DeleteElement have to use ‘this’ pointer. Declare PrintSet as a constant function.
Constructor with no parameters that initialize the set with 0, and prints: “Constructor”
Destructor that prints: “Destructor”
Define the following friend functions:
intersectionSets, unionSets, and isEqual. Suggest a suitable parameters for them.
In the main, declare three objects of the IntegerSet class type.
Set the elements that have even index in the first object with 1.
Set the elements from 0 to 10 in the second object with 1.
Use isEqual to decide whether both sets are equal or not.
Use unionSets to store in the third object the union of object1 and object2.Print object three before and after the operation.
Declare a fourth constant object. Apply to it the function InsertElement. What will happen? Why?
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
إخواني ....
الهدف من طرح هذه المشاركة ... المساعدة في بعض القضايا الفنية
وليس الغرض حل كامل للوظائف ؟؟؟؟
أرجوا من الجميع الإلتزام بذلك ؟؟؟
حيث أني لم ولن أنتبه ولا بطرف بصري إلى من يطلبون البرنامج بشكل كامل ...
حاول حله وأضف مشاركة بمحاولتك ونحن نصحح الأخطاء بإذن الله :
وكمثال على ذلك :
اقتباس:
انا سويت البرنامج بس يطلع انه في ايرور ما ادري ليش ..
هي السؤال :
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
+ معك حق أخي oms ... البنات وما أدراك ما البنات ^_* .. أعذروني %_% ... لكنكن تردن كل شيء جاهز ...
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
أختي نوران :::
هذا برنامجك بعد التعديل :::
كود:
#include<iostream>
using namespace std;
int searching (char a[],int size,char key)
{
for ( int i=0;i<size;i++)
{
if (a[i]== key)
return i;
}
return -1;
}
int searching (double a[],int size,double key)
{
for ( int i=0;i<size;i++)
{
if (a[i]== key)
return i;
}
return -1;
}
int searching (int a[],int size,int key)
{
for ( int i=0;i<size;i++)
{
if (a[i]== key)
return i;
}
return -1;
}
void main()
{
int x[]={1,2,3,7,8};
double y[]={1.3,1.9,1.5,7.6,4.1,1.7};
char z[]={'z','e','r','i','k','o','l'};
cout<<searching(z,7,'h')<<endl;
cout<<searching(y,6,1.3)<<endl;
cout<<searching(x,5,'o')<<endl;
}
والمشكلة كانت أنك إستخدمتي التيمبليت ...
ومن خصائص التمبليت أنه يأخذ النوع مرة واحدة فقط ..
أي أنه إذا أخذ أول مرة إنتجر ( عدد صحيح ) يحافض على النوع
طيلة تنفيذ البرنامج .... وفي مثالنا هذا البرنامج إستخدم ثلاث
أنواع وهي الإنتجر والدبل والكاراكتر ...
والحل كان أننا قمنا بكتابة أوفر لود للدالة ..
أي أننا عرفناها ثلاث مرات بحسب الأنواع التي عندنا
حيث أنه إذا كان النوع المطلوب إنتجر يتجه مباشرة للدالة التي تدعم الإنتجر
وإذا كان دبل يتجه نحو الدبل وهكذا ....
أرجوا أن أكون قد وفقت أختي لحل سؤالك بالشكل المطلوب ....
ولك أجمل تحياتي مني على أسلوب طرح المساعدة ... وبشكل صحيح ..:ciao:
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
omsالى الاخ اذا مافيه احراج انا كتبت موضوع في منتدى البرمجه بعنوان الى خبراالبرمجه بلغة السي
ابيك تجاوبني عليه تكفى وبسرعه انا محتاج البرنامج الاربعاء ضروري
طلب ثاني:انقل الموضوع هنا
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
يا سلام عليك هذه هي الخطوة الصح ....
يعني تحط سؤالك هنا ؟؟؟
وثانياً لا يجوز وضع مشاركة داخل مشاركة ؟؟؟
قم أنت بكتابتها مرة ثانية هنا !!!
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
Hello everybody
i need your help in the follwoing programme using C language
Develop a Billing System in which three arrays are maintained. The first array has the names of the costumers, the second array has their account numbers, and the third array has their monthly balance. Your program should read arbitrary data from an input file "accounts.txt", and then display a menu with the following options:
1. Find the account number (given the name)
2. Find the monthly balance in Riyals (given the account number)
3. Add a new customer (i.e. a new account)
4. Display sorted lists of account numbers, names or balances (according to user’s section)
5. Quit
You should apply modular programming, with a separate function for each major task in your programme
i spent two weeks trying to do it :vereymad:
but no way :vereymad:
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
شكراا اخ oms :p
تعبناك معنا...
بس اذا ممكن تشرح لي فكرة ال class وstructure او اذا عندك موقع يشرح هذا الموضوع
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
Hello guys
guys
when i had a look for this topic i saw somthing strange
yes something rather than what i doing
i'm satudying C language but i haven't been seeing somthing like
#include<iostream>
in my programme i always use something like
#include<stdio.h>
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
لو سمحت اخوي بس ابي شرح
String buffer
String Tokenizer
و ال الدوال عليهم function
اللي فيهم
ممكن خيو
وبكون شاكرة كتير
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
على اخوي....حبيت أشكرك
واعتذر ان سببت لك ازعاج
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
السلام عليكم اخواني
انا عندي هالبرنامج وهو ادخال بيانات وطبعاتها
بس عندي مشكلة وهي
انو
لما اعمل عرض للبيانات المدخلة يطلع لي
null
0
0.0
ومو راضي يطلع معي وكمان
هلأ مثلا
عند ادخال البينات,, انا بدي البرنامج يقول لي هذا (المساق) الذي ادخلته غير موجود او تم ادخاله
اوكي هذا بالبحث
هاي الكود
كود:
class Course
{
String Course_name;
int time_interval;
double price;
int registerd_student;
void getinformation()
{
System.out.println("Enter time_intervalr: ");
time_interval = MyInput.readinteger();
System.out.println("Enter price value: ");
price = MyInput.readdouble();
}
void printinformation()
{
System.out.println("Course_name: "+Course_name);
System.out.println("time_interval: "+time_interval);
System.out.println("price value: "+price);
}
void coursename()
{
System.out.println("Enter Course_name: ");
Course_name = MyInput.readstring();
}
////////////////////////////////////////////
public class search
{
public static int isfound(Course cc,Course[] c)
{
for(int i=0;i<c.length;i++)
if((c[i].Course_name.equals(cc.Course_name)))
return i;
return -1;
}
}
///////////////////////////////
System.out.println("Enter no.of course to add");
n=MyInput.readinteger();
Course c[] = new Course[n];
do
{
choice=MyInput.readchar();
/////////////swich/////////////////////////
switch(choice)
{
case'1':
System.out.println("\n\n\t\t Add new course");
System.out.println("\t\t_______________\t\t\t");
for(int i=0;i<c.length;i++)
{
c[i] = new Course();
c[i].coursename();
c[i].getinformation();
}
//عند البحث .......؟!؟
/* Course cc = new Course();
System.out.println("Enter Course information to search about it:");
cc.coursename();
for(int i=0;i<se.length;i++)
{
se[i]=new search();
int index = se[i].isfound(cc,c);
if(index!=-1)
System.out.println("Course is found ....");
else
System.out.println("Course is not in the course's main in this center ....");
}*/
break;
////////////////////
case'2':
System.out.println("\n\n\t\t view course");
System.out.println("\t\t_______________\t\t\t");
for( int i=0;i<c.length;i++)
{
c[i] = new Course();
c[i].printinformation();
}
break;
////////////////////
case'3':
System.out.println("\n\n\t\t cancel course");
System.out.println("\t\t_______________\t\t\t");
break;
//هذا ممكن اعرف كيف اذا بدي اعمل اغلاق له او مسح (delete)مثلا
}while(choice!='9');
System.in.read();
}
و مشكورين
ارجو المساعدة
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
شكلكم زعلتم الاخ oms ... الله يستر اذا راح عليكم وخلى كل هذه الاسئله ... مين راح يجيبكم !
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
لا معاذ الله ... ما زعلت ...
بس أنا مضغوط اليومين الجايين ...
لذلك ما رديت ولا على واحد ....
بس إن شاء الله أرد في القريب ...
مشاركة: طلبات الأسئلة عن لغات البرمجة هنا
plzzzzzzz
sir
help us as fast as you can
cuz i need the programme in two days
and thank you so much again