473,698 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help needed with some c++ programs... urgent

Hi friends,
My sister is in great problem , she has this exam of C++ and
she is stuck up with some questions, if friends like this group
provides some help to her, she will be very grateful.
These are some questions:-
7. design and implement a class binsearch for a binary search tree.it
includes search,remove and add options.make suitable assumption.

8.explai how pointers to functions can be declared in c++.under what
conditions can two pointer variables be added,subtracte d and compared?

9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0

If u can provide the full answer it will be great , but if u
can't, send the answer in brief , so, that it is understandable.
Thank you very much VibhaJha.
Jul 22 '05 #1
12 2320

"Vibhajha" <vi*********@ya hoo.com> wrote in message
news:8d******** *************** @posting.google .com...
Hi friends,
My sister is in great problem , she has this exam of C++ and
she is stuck up with some questions, if friends like this group
provides some help to her, she will be very grateful.
These are some questions:-
7. design and implement a class binsearch for a binary search tree.it
includes search,remove and add options.make suitable assumption.

8.explai how pointers to functions can be declared in c++.under what
conditions can two pointer variables be added,subtracte d and compared?

9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0


Your sister should post the attempts that she has made to answer these
questions. People will gladly help her if she can show she has made some
effort herself. What people will not do is post complete answers to her,
your sister will learn very little that way.

And of course it will help if your sister posts herself instead of through
you.

john
Jul 22 '05 #2
Hi,
ya she can post this question with herself , if she has this
internet!!!, she lives in such a place where she lacks internet
facility, and good teachers , so about some questions she doesn't know
what the question means.... and i don't know C++ , so, i can't try and
send u trial answers , she has this test in coming next weekend.. she
has already sent me questions through Post. Its urgent people please
try and understand , its the question of her career, i am sure next
time , she will definitely, not write just questions , but send the
trial answers too, please friends, this time please help her. Next
time i will not give you any chance to complain.
Thanks for reading me.....
VibhaJha.
Jul 22 '05 #3
Vibhajha posted:
Hi friends,
My sister is in great problem , she has this exam of C++ and
she is stuck up with some questions, if friends like this group
provides some help to her, she will be very grateful.
These are some questions:-
7. design and implement a class binsearch for a binary search tree.it
includes search,remove and add options.make suitable assumption.

8.explai how pointers to functions can be declared in c++.under what
conditions can two pointer variables be added,subtracte d and compared?

9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0

If u can provide the full answer it will be great , but if u
can't, send the answer in brief , so, that it is understandable.
Thank you very much VibhaJha.

Fuck Off.
-JKop
Jul 22 '05 #4
Vibhajha wrote:

Hi,
ya she can post this question with herself , if she has this
internet!!!, she lives in such a place where she lacks internet
facility, and good teachers , so about some questions she doesn't know
what the question means.... and i don't know C++ , so, i can't try and
send u trial answers , she has this test in coming next weekend.. she
has already sent me questions through Post. Its urgent people please
try and understand , its the question of her career
What does that mean?
What career?
Professional? If she can't answer that questions she is not (yet) ready
for industrial professional programming.
, i am sure next
time , she will definitely, not write just questions , but send the
trial answers too, please friends, this time please help her. Next
time i will not give you any chance to complain.
So what exactly does she need?
7. design and implement a class binsearch for a binary search tree.it
includes search,remove and add options.make suitable assumption.
Hmm. A binary search tree. Every lousy book about data structure has one
chapter about binary search trees. Let me see:
www.google.com
Search phrase: "binary search tree C++"
returns around 132000 hits.
8.explai how pointers to functions can be declared in c++.under what
conditions can two pointer variables be added,subtracte d and compared?
Seriously. The first part of this question should be easy to answer
with her text book. Function pointer syntax isn't used very often in C++,
but nevertheless, if you got it once it is easy to remember.
Also see the FAQ for some common pitfalls:
http://www.parashift.com/c++-faq-lit...o-members.html

The second part of the question is really very basic. If she can't answer
that on her own, ....
9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0


I really don't know what to answer here. Seems like straightforward
class to solve a quadratic equation. The only thing that's puzzling me
is: Why is there the request for polymorphism in the question? Anybody?
(Hmm. There are 2 well known mathematical ways to solve a quadratic
equation. Could it be that this should be used as base for polymorphism?)

--
Karl Heinz Buchegger
kb******@gascad .at
Jul 22 '05 #5
> > 9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0


I really don't know what to answer here. Seems like straightforward
class to solve a quadratic equation. The only thing that's puzzling me
is: Why is there the request for polymorphism in the question? Anybody?
(Hmm. There are 2 well known mathematical ways to solve a quadratic
equation. Could it be that this should be used as base for polymorphism?)


I reckon the polymorphism is for different kinds of number class. E.g. real
numbers or complex numbers.

john
Jul 22 '05 #6
In message <41************ ***@gascad.at>, Karl Heinz Buchegger
<kb******@gasca d.at> writes
Vibhajha wrote:

Hi,
ya she can post this question with herself , if she has this
internet!!!, she lives in such a place where she lacks internet
facility, and good teachers , so about some questions she doesn't know
what the question means.... and i don't know C++ , so, i can't try and
send u trial answers , she has this test in coming next weekend.. she
has already sent me questions through Post. Its urgent people please
try and understand , its the question of her career
What does that mean?
What career?
Professional ? If she can't answer that questions she is not (yet) ready
for industrial professional programming.


Of course "she" is; she'll just get her "friend" to post all her
professional problems here for clc++ to solve :-(

[...]
9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0
I really don't know what to answer here. Seems like straightforward
class to solve a quadratic equation.


Nothing in numerics is "straightforwar d" ;-)
The only thing that's puzzling me
is: Why is there the request for polymorphism in the question? Anybody?
(Hmm. There are 2 well known mathematical ways to solve a quadratic
equation. Could it be that this should be used as base for polymorphism?)

Different precisions? Real versus complex coefficients?

(OK, personally I'd use template genericity, not runtime polymorphism,
for this sort of thing, but it's just possible that's what "her" teacher
is looking for.)

--
Richard Herring
Jul 22 '05 #7
John Harrison wrote:
9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0


I really don't know what to answer here. Seems like straightforward
class to solve a quadratic equation. The only thing that's puzzling me
is: Why is there the request for polymorphism in the question? Anybody?
(Hmm. There are 2 well known mathematical ways to solve a quadratic
equation. Could it be that this should be used as base for polymorphism?)


I reckon the polymorphism is for different kinds of number class. E.g. real
numbers or complex numbers.


Oh. I see.
Something along

class Number
{
virtual void Add( ... )
virtual void Subtract( ... )
...
// or maybe some operators
};

class IntNumber : public Number
{
...
};

class Solver
{
public:
void Solve( const Number* CoeffA, const Number* CoeffB,
const Number* CoeffC, const Number* Result );
};
Silly assignment.
A template would be far better for this.

--
Karl Heinz Buchegger
kb******@gascad .at
Jul 22 '05 #8
Richard Herring wrote:

The only thing that's puzzling me
is: Why is there the request for polymorphism in the question? Anybody?
(Hmm. There are 2 well known mathematical ways to solve a quadratic
equation. Could it be that this should be used as base for polymorphism?)

Different precisions? Real versus complex coefficients?

(OK, personally I'd use template genericity, not runtime polymorphism,
for this sort of thing, but it's just possible that's what "her" teacher
is looking for.)


Yeah. John brought me on that track too.
It's doable, although it would be a silly assignment.
Especially because then the equation solver would not
be polymorphic, but the 'numbers' it crunches.

--
Karl Heinz Buchegger
kb******@gascad .at
Jul 22 '05 #9
Vibhajha wrote:
Hi friends,
My sister is in great problem , she has this exam of C++ and
she is stuck up with some questions, if friends like this group
provides some help to her, she will be very grateful.
These are some questions:-
7. design and implement a class binsearch for a binary search tree.it
includes search,remove and add options.make suitable assumption. See <map>. Many implementations of the map use a binary tree of some
type.

8.explai how pointers to functions can be declared in c++.under what
conditions can two pointer variables be added,subtracte d and compared? Search the web for "SGI STL". Silicon Graphics Inc. has a good
explanation of pointers and when the can be added, subtracted
and compared.

9.design and develop a polymorphic class to solve a general quadratic
equation ax2+bx+c=0 Sorry, but I don't do urgent homework requests. Contact me
much earlier and I'll be glad to oblige.

If u can provide the full answer it will be great , but if u
can't, send the answer in brief , so, that it is understandable.
Thank you very much VibhaJha.

Search newsgroups, the web and books. Searching is a valuable
skill.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9160
by: choksi | last post by:
Hello All I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian Linux and with a fake (internal)ip. Php Configure command './configure' '--with-apxs=/www/bin/apxs' '--with-openssl-dir=/usr/local/src/webserver/openssl-0.9.7d/' '--enable-trans-sid' '--disable-libxml' Registered PHP Streams : php, file, http, ftp Registered Stream Socket Transports : tcp, udp, unix, udg allow_url_fopen : ...
83
7829
by: deppy_3 | last post by:
Hi.I am started learning Programm language C before some time.I am trying to make a programm about a very simple "sell shop".This programm hasn't got any compile problem but when i run it i face some other ploblems which i can not correct.I would appreciated if someone take a look at my programm so as to help me.I tried many times to find out where my mistakes are but i didn't manage something. I have made some comments due to the programm...
4
2199
by: naknak4 | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will implement all three techniques as programs. In these programs, as well as solving the problem, you will also measure how long the program takes to run. The programs are worth 80% of the total mark. The final 20% of the marks are awarded for a...
6
2123
by: naknak | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will implement all three techniques as programs. In these programs, as well as solving the problem, you will also measure how long the program takes to run. The programs are worth 80% of the total mark. The final 20% of the marks are awarded for a...
1
2322
by: karizmatrix22 | last post by:
Hi, I need a programmer who can write 3 programs for following questions below.Programs need to be ready before nextweek.thank you. Person who help me these 3 questions will be get paid.. I am new to programming, thats why i need help..i dont understand any coding at all. Question 1: Write an application that accepts a userís password from the keyboard. When the entered password is less than six characters, more than ten characters, or...
1
1203
by: sauravb | last post by:
hey everybody im a beginner at C++ and i really really might sound dumb but please help me.. al i need to do is display the map of india using borland in graphics mode....i've been searching fr sumthin on the net but i only seem to find complicated programs to move images around but none so simple...so please do help me asap..... the help's really appreciated.... rgds saurav
0
2587
by: Christopher | last post by:
Urgent Help Needed: The EPVH-1.1 Visual Hull Library. Dear All, I am a student doing research in computer vision. The EPVH-1.1 Visual Hull Library will really help a lot in my research. I did have this library before but I didn't keep my copy of this library because I always thought I could download it again form internet. However, the author of this library closed the download
2
1503
by: feltra | last post by:
Hi, The following is from my friend, who has some technical problem at present in accessing the web... I am writing for him... Kindly request your inputs ASAP, as he has some kind of deadline tomorrow. .......................................................................................... I am having an issue with MDI form. I have an MDI form and some Child forms. In order to enable for a choice, I am displaying a message box in...
2
1157
by: Rory_Small | last post by:
Help! I am running windows XP Media Edition. I have 4 accounts set up. Mine is the administrator, 2 are granted administrator privileges and 1 is limited. The other 3 accounts cannot access the internet because of the McAfee firewall (or so I thought). But when I logged in as my wife (with administrator privileges), I could not even open c:\program files (says I do not have permission). May explain why I cannot open McAfee in her account...
0
8668
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8598
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
Oralloy
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9014
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Duprť who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5857
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.