Would u help me with this task, I am new in C++ programming, this codes have alot of errors, I have never work with graphs before, I am using Borlard C++ Ver 5.02. I was told u can not run a graph task using text editor. If that is the case how can I run this. I have only 7Days to handin this Task. (a) Explain what process are being carried out by each method.
(b)Test this code on your system and report the outcome of your tests in a systematic manner. You need to provide a rationale for every test undertaken.
(c)Write a critical review of a given code and identify any strengths or weakness that may be present. The Message Error I am getting when running this programme is : GRAPHICS.H(20.5 2); Error directive:BGI graphics not supported under windows. -
#include <graphics.h>
-
#include <stdlib.h>
-
#include <time.h>
-
#include <math.h>
-
#include <conio.h>
-
const int X0=320;
-
const int Y0=240;
-
const float PI=3.14159;
-
const int NUME=30;
-
const DENOM=100;
-
const int NUMBER=7;
-
const float RAD=3.0;
-
const float DELTA=0.1;
-
const int SEGS=60;
-
const int REDUX=3;
-
const int MIN=1;
-
class cluster
-
{
-
Public:
-
void display(int size, int x, int y);
-
};
-
class tendril
-
|
-
Public:
-
void display (int size, float theta, int x, int y);
-
};
-
void cluster::display(int size, int x,int y)
-
{
-
if (kbhit())
-
exit(0);
-
for(int i=0;i<NUMBER;i++)
-
{
-
float theta i*2*PI/NUMBER;
-
moveto(x,y);
-
tendril t;
-
t.display(size,theta, x,y);
-
}
-
}
-
void tendril::display(int size, float theta, int x,int y)
-
{
-
for(int j=0;j<size;j++)
-
{
-
int chng=(random(DENOM)<NUME)?-1:1);
-
theta=thetha+chng*DELTHETA;
-
x=x+RAD*sin(theta);
-
y=y+RAD*cos(theta);
-
if(size<4)setcolor(RED);
-
else if(size<13)setcolor(GREEN);
-
else if(size<40)setcolor(LIGHTGREEN);
-
else setcolor(YELLOW);
-
lineto(x,y);
-
}
-
if(size>MIN)
-
{
-
cluster c;
-
int newsize=size/REDUX;
-
c.display(newsize,x,y);
-
}
-
}
-
void main ()
-
{
-
int driver, mode;
-
driver=VGA;
-
mode=VGAHI;
-
initgraph(&driver,&mode,"\\bc5\\bgi");
-
randomize();
-
int x=X0, y=Y0;
-
int size=SEGS;
-
cluster c;
-
c.display(size, x,y);
-
getch();
-
closegraph();
-
}
Would u help me with this task, I am new in C++ programming, this codes have alot of errors, I have never work with graphs before, I am using Borlard C++ Ver 5.02. I was told u can not run a graph task using text editor. If that is the case how can I run this. I have only 7Days to handin this Task.
(a) Explain what process are being carried out by each method.
(b)Test this code on your system and report the outcome of your tests in a systematic manner. You need to provide a rationale for every test undertaken.
(c)Write a critical review of a given code and identify any strengths or weakness that may be present.
2 2124 sicarie 4,677
Recognized Expert Moderator Specialist
Would u help me with this task, I am new in C++ programming, this codes have alot of errors, I have never work with graphs before, I am using Borlard C++ Ver 5.02. I was told u can not run a graph task using text editor. If that is the case how can I run this. I have only 7Days to handin this Task. (a) Explain what process are being carried out by each method.
(b)Test this code on your system and report the outcome of your tests in a systematic manner. You need to provide a rationale for every test undertaken.
(c)Write a critical review of a given code and identify any strengths or weakness that may be present. The Message Error I am getting when running this programme is : GRAPHICS.H(20.5 2); Error directive:BGI graphics not supported under windows. -
#include <graphics.h>
-
#include <stdlib.h>
-
#include <time.h>
-
#include <math.h>
-
#include <conio.h>
-
const int X0=320;
-
const int Y0=240;
-
const float PI=3.14159;
-
const int NUME=30;
-
const DENOM=100;
-
const int NUMBER=7;
-
const float RAD=3.0;
-
const float DELTA=0.1;
-
const int SEGS=60;
-
const int REDUX=3;
-
const int MIN=1;
-
class cluster
-
{
-
Public:
-
void display(int size, int x, int y);
-
};
-
class tendril
-
|
-
Public:
-
void display (int size, float theta, int x, int y);
-
};
-
void cluster::display(int size, int x,int y)
-
{
-
if (kbhit())
-
exit(0);
-
for(int i=0;i<NUMBER;i++)
-
{
-
float theta i*2*PI/NUMBER;
-
moveto(x,y);
-
tendril t;
-
t.display(size,theta, x,y);
-
}
-
}
-
void tendril::display(int size, float theta, int x,int y)
-
{
-
for(int j=0;j<size;j++)
-
{
-
int chng=(random(DENOM)<NUME)?-1:1);
-
theta=thetha+chng*DELTHETA;
-
x=x+RAD*sin(theta);
-
y=y+RAD*cos(theta);
-
if(size<4)setcolor(RED);
-
else if(size<13)setcolor(GREEN);
-
else if(size<40)setcolor(LIGHTGREEN);
-
else setcolor(YELLOW);
-
lineto(x,y);
-
}
-
if(size>MIN)
-
{
-
cluster c;
-
int newsize=size/REDUX;
-
c.display(newsize,x,y);
-
}
-
}
-
void main ()
-
{
-
int driver, mode;
-
driver=VGA;
-
mode=VGAHI;
-
initgraph(&driver,&mode,"\\bc5\\bgi");
-
randomize();
-
int x=X0, y=Y0;
-
int size=SEGS;
-
cluster c;
-
c.display(size, x,y);
-
getch();
-
closegraph();
-
}
Would u help me with this task, I am new in C++ programming, this codes have alot of errors, I have never work with graphs before, I am using Borlard C++ Ver 5.02. I was told u can not run a graph task using text editor. If that is the case how can I run this. I have only 7Days to handin this Task.
(a) Explain what process are being carried out by each method.
(b)Test this code on your system and report the outcome of your tests in a systematic manner. You need to provide a rationale for every test undertaken.
(c)Write a critical review of a given code and identify any strengths or weakness that may be present.
Well, let's start with A. What do you think is being done by these functions?
Well, let's start with A. What do you think is being done by these functions?
Thank u sicarie, I have cleared the errors, The programme is running Now, so I will score 40 marks.
Regards
Zak
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Lilith |
last post by:
Is there a python module somewhere (been searching today, no luck)
which has efficiently coded various graph-handling routines, such as
finding the shortest path through a graph, or the set of all paths
through a graph? I'm not a compsci-educated person, so coding my own
would be less parsimonious.
Thanks for any suggestions!
D
|
by: SallyBenjamin |
last post by:
Hello..
Can anyone help me with this coding. Basically, it needs to have add
node, remove node, add edges , remove edges and display the graph
But.I have only succedded to add node, add and remove edge and also
display graph...
Can anyone plz help me to change this and add the nodes..
Thank u
|
by: Christian Christmann |
last post by:
Hi,
I need to write a graph which provides at least the
following functions:
1) stores nodes and edges (both store further information which
can be of any type)
2) manipulations on nodes and edges like delete, add ...
3) provides a list of all successors/predecessors for a given node
4) provides a list of all nodes that can be reached...
|
by: Joe |
last post by:
Dear Friends,
I want dynamically create the Graph from C# application. The graph would be
timeInterval VS percentage.
timeInterval percentage Recordno
8/2/2003 10:11:00 AM 10 ABC123
8/3/2003 10:11:00 AM 20 ABC123
8/4/2003 11:11:00 AM ...
|
by: David Van D |
last post by:
Hi there,
A few weeks until I begin my journey towards a degree in Computer
Science at Canterbury University in New Zealand,
Anyway the course tutors are going to be teaching us JAVA wth bluej and
I was wondering if anyone here would be able to give me some tips for
young players such as myself, for learning the language.
Is this the...
| |
by: vbnetdev |
last post by:
My boss wants this done in a day. I would be happy with a week!
Anyway, I have a dataset filled with data and need to populate an MS word
chart with it when writing a report. Any tutorials or suggestions would be
great.
Sample data at http://www.kjmsolutions.com/sample.txt
|
by: jatininfo02 |
last post by:
Hi Friend i am working on a task where i have to display XML Stream data on a graph for a window application,
data is coming in the form of xmstream continuously and we have to plot a graph of that data continually.
Any one can suggest a any similar types of code..
Thanks
Jitendra Pratap singh
indurotech.jp@gmail.com
|
by: sriniwas |
last post by:
Hi Frnd's,
m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my problem is tht,If graph is to large if it going out of screen thn ,i m getting jpg image on screen disply graph,m not getting the image of tht graph...
|
by: thatos |
last post by:
I am trying to write an program which performs a breath first search on a graph and returns a tree.
class Alist{
int x;
Alist next;
public Alist (){
}
public Alist(int x){
this.x = x;
next = null;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |