C++ how to create this program?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 2
Reputation: just11 is an unknown quantity at this point 
Solved Threads: 0
just11 just11 is offline Offline
Newbie Poster

C++ how to create this program?

 
0
  #1
Oct 25th, 2008
Q) Draw an inheritance hierarchy for class Quadrilateral, Trapezoid, Parallelogram, Rectangle and square.Use Quadrilateral as the base of the hierarchy. Make the hierarchy as deep as possible.

Can anyone help me to create it as a proper program?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 206
Reputation: grumpier has a spectacular aura about grumpier has a spectacular aura about 
Solved Threads: 31
grumpier grumpier is offline Offline
Posting Whiz in Training

Re: C++ how to create this program?

 
0
  #2
Oct 25th, 2008
1) People here are not free homework generators; at best, you'll get help if you show evidence you've tried and encountered a particular problem.

2) This homework exercise does not require writing a program.
Last edited by grumpier; Oct 25th, 2008 at 4:26 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2
Reputation: just11 is an unknown quantity at this point 
Solved Threads: 0
just11 just11 is offline Offline
Newbie Poster

Re: C++ how to create this program?

 
0
  #3
Oct 25th, 2008
Originally Posted by grumpier View Post
1) People here are not free homework generators; at best, you'll get help if you show evidence you've tried and encountered a particular problem.

2) This homework exercise does not require writing a program.
I know, that is why i am confused how to create it. As out teacher ask us to create it as a program.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 206
Reputation: grumpier has a spectacular aura about grumpier has a spectacular aura about 
Solved Threads: 31
grumpier grumpier is offline Offline
Posting Whiz in Training

Re: C++ how to create this program?

 
0
  #4
Oct 25th, 2008
Then ask your teacher for clarification of what he/she means. As worded, the question does not involve writing a program.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,955
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 283
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: C++ how to create this program?

 
1
  #5
Oct 25th, 2008
Q) Draw an inheritance hierarchy...
Take a pencil and a piece of paper and DRAW, DRAW, DRAW!

By the way, this is an initial phase in any serious programming endeavor : put something on paper first.
Don't start to run before you can walk.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 40
Reputation: seanhunt is an unknown quantity at this point 
Solved Threads: 6
seanhunt seanhunt is offline Offline
Light Poster

Re: C++ how to create this program?

 
0
  #6
Oct 27th, 2008
Originally Posted by just11 View Post
Q) Draw an inheritance hierarchy for class Quadrilateral, Trapezoid, Parallelogram, Rectangle and square.Use Quadrilateral as the base of the hierarchy. Make the hierarchy as deep as possible.

Can anyone help me to create it as a proper program?
Well you have the base class already: Quafrilateral. That goes on top. Next in hierarchy would be the ones that are the closest to a quadrilaterl, that is, they share the same properties. Making it as 'deep' as possible means that you would probably want to create a pretty straight line vertically, rather than horizontaly: Like
  1. class X
  2. |
  3. class Y
  4. |
  5. class Z
  6.  
  7. Rather than
  8.  
  9. class X
  10. / \
  11. class Y class Z
It doesn't sound like you are being asked to write a program, just a diagram.

Thanx...
Sean
Last edited by WaltP; Oct 27th, 2008 at 6:58 pm. Reason: Try using the PREVIEW button before posting. Your diagram was useless as posted.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC