• 100% Satisfaction Guarantee

Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
3546829
Scott is online now

# Project: Pure Abstract Base class Define a pure abstract

### Customer Question

Project: Pure Abstract Base class
Define a pure abstract base class called BasicShape. The BasicShape class should have the following members:
Private Member Variable:
area a double used to hold the shape’s area
Public Member Functions:
getArea This function should return the value in the member variable area.
calcArea This function should be a pure virtual function.
Next, define a class named circle. It should be derived from the BasicShape class. It should have the following members:
Private Member Variables:
centerX A long integer used to hold the x coordinate of the circle’s center.
centerY A long integer used to hold the y coordinate of the circle’s center
Public Member Functions:
constructor Accepts values for centerX, centerY and radius. Should call the overridden calcArea function described below.
getCenterX return the value of centerX
getCenterY return the value of centerY
calcArea calculates the area of the circle (area = 3.14159 * radius * radius) and stores the result in the inherited member area.
Next, define a class named Rectangle. It should be derived from the BasicShape class. It should have the following members:
Private Member Variables:
width, a long integer used to hold the width of the rectangle.
length, a long integer used to hold the length of the rectangle.
Public Member Functions:
constructor accepts values for width and length. Should call the overridden calcArea function described below.
getWidth returns the value in width.
getLengh returns the value in length.
calcArea calculates the area of the rectangle (area = length * width) and stores the result in the inherited member area.
After you have created these classes, create a driver program that defines a Circle object and a Rectangle object. Demonstrate in this driver program that each object properly calculates and reports its area.
Submitted: 2 years ago.
Category: Homework
Expert:  Raj replied 2 years ago.
Hi There,

I will be helping you with the requirement.
Can i know the programming language in which you need the above requirement implemented?

Thank you
Expert:  Raj replied 2 years ago.
Do you still need the solution code?
If Answer is Yes than please let me know whether the requirement is in C++, C# XXXXX Java Programming language?
Customer: replied 2 years ago.

Hi thanks for the response but I already got it.

Expert:  Raj replied 2 years ago.
Ok no problem.

In future if you need any programming of RDBMS help than you can request me by beginning your question with TO RAJ followed by the question.

Have a Good Day.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
• He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

• ### LogicPro

#### Satisfied Customers:

4925
Expert in Java C++ C C# VB Javascript Design SQL HTML
< Last | Next >

### LogicPro

#### Satisfied Customers:

4925
Expert in Java C++ C C# VB Javascript Design SQL HTML

### Manal Elkhoshkhany

#### Satisfied Customers:

4538
More than 5000 online tutoring sessions.

### Linda_us

#### Satisfied Customers:

3138
Post Graduate Diploma in Management (MBA)

### Chris M.

#### Satisfied Customers:

2602
Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

### F. Naz

#### Satisfied Customers:

2126
Experience with chartered accountancy

### Bizhelp

#### Satisfied Customers:

1887
Bachelors Degree and CPA with Accounting work experience

### Seanna

#### Satisfied Customers:

1781
3,000+ satisfied customers, all topics, A+ work