الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

plz i need help in ++c

بدأه pencil في 26 مارس 2010 · 2 رد · 457 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

i need help to solve these questions plz

1-

write aprogram that handle an array of data and perform a sorting operation on this array then create a random access file that stores the array and the stored array in the files

2_

write a program that read the array and display the content of the array from the file created in question below

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

1-

using class point write anew class called squir which represent a squir it uses the base class point to define the lower left corner and it adds aparameter

represent the side length

2-

write the necessory method to perform the following operations

a-calculate the area of squir

b-display the four corners cordinate ,the side length and the area

c-perform a shift operation on x axis &y axis or both of them

3-

add operator overloadingfunction to override the operator << which will perform the operation in 2-a

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

really,i will be great thankful to any one can help me

#2

حسب قوانين المنتدى يجب ان نرى محاولتك أولا.

تحياتي

OMANI FOR EVER

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

post-12787-12780191801974.jpg

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

#3

#include<iostream.h>

#include<string>

using namespace std;

class point

{

public:

point();

point(double x,double y);

void display();

void set_point(double x,double y);

string get_name();

protected:

double x_cord;

double y_cord;

string name;

};

point::point()

{

x_cord=0;

y_cord=0;

name="point";

}

point::point(double x,double y)

{

x_cord=x;

y_cord=y;

name="point";

}

void point::display()

{

cout<<"\n["<<x_cord<<","<<y_cord<<"]\n";

}

void point::get_name()

{

return name;

}

class squir::public point

{

public:

squir();

void displaycorner();

void area();

protected:

double x_cord;

double y_cord;

int length;

}:

squir::squir

{

x_cord=0;

y_cord=0;

length=0;

}

int squir::area(int l)

{

l=length;

return l*l;

}

void squir::displaycorner(double x,double y,int l)

{

x_cord=x;

y_cord=y;

length=l;

cout<<"(x1,y2)="<<x<<y<<endl;

cout<<"(x1,y2)="<<x-l<<y<<endl;

cout<<"(x2,y1)="<<x<<y-l<<endl;

cout<<"(x2,y2)="<<x-l<<y-l<<endl;

}

مواضيع مشابهة