GetACoder.com

 
 

Home | My Account | Post Project | Browse Projects | RSS Feeds New!

 

Simple Shape Area & Perimeter Calculation

 
 
Download the Free Step-by-Step Guide
     
Budget: $ 20-100
Status: Closed for Bidding (selected user roybuet)
Project Creator:
yboioPirateWorld  
  10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10 3 reviews
Required Skills: C++ / C, Programming
Attached Files: Projectsrc.zip
 
post new project
email this project
discuss this project
send private message to project creator
more options

NEW

SEND

DISCUSS

CONTACT

OPTIONS

Description
For this project you are required to extend a C++ application that has been provided for you. This application follows a simple object-oriented example of a collection of shapes. Three shapes are supported: Circle, Rectangle, and Triangle, and functions are provided to calculate the perimeter and the area of these shapes. A base class has been defined, Shape, which allows the perimeter and area functions to be made polymorphic.

All of the code for the shapes has been provided, along with a simple menu system to drive the application. What is missing, is the collection functionality, i.e., the ability to store several shapes. For this purpose, we will be using an array, as follows:

Example of how the array will be used
The first five elements (elements zero through four) have data stored in them, and the remainder of the array has not yet been used. An additional variable, lastUsed, has been used to mark the location or boundary where elements are stored in the array. Thus to store an additional element in the array, it will be stored at the location (lastUsed + 1), and then lastUsed will be incremented to mark the new location.

The following files have been provided for the project which may not be modified:

1. Program.cpp, containing the main() function and several helper functions;
2. Shape.h, defining the Shape base class for the different shapes (there is no .cpp file for the Shape class);
3. Circle.h and Circle.cpp, defining the Circle shape class;
4. Rectangle.h and Rectangle.cpp, defining the Rectangle shape class; and
5. Triangle.h and Triangle.cpp, defining the Triangle shape class.

A skeleton of the class that will define the container, ShapesCollection, has been provided to guide you in this task. You will need to make the following modifications to these files:

1. ShapesCollection.h - you will need to modify the private: section to add attributes to support your functionality, note that the array is already declared, do not modify this line. No other changes are permitted to this header file; and
2. ShapesCollection.cpp - you will need to modify every function provided in this file/class.

The following information will guide you in each of the functions of the ShapeCollection class:

* Constructor - the creation of an array of pointers is required for this program, do not modify this line. You will however need to add lines to initialise any of the attributes you have added to the ShapesCollection.h file.
* Destructor - all dynamically allocated memory must be deleted, including the shapes provided to the AddShape function. Note that deletion of the array created in the constructor has already been provided, do not modify this line.
* AddShape() - the provided shape must be added to the array as discussed above. You should throw an exception if there is no more room in the array, e.g., throw string("ShapeCollection out of space");
* Count() - return the number of elements currently stored in the array.
* TotalAreas() - add up the areas of all the shapes stored in the array and return the total.
* TotalPerimeters() - add up the perimeters of all the shapes stored in the array and return the total.

Reminder
You may not start working in this and any project before your bid is accepted. Any user who violates this policy may have their account permanently suspended.

 Bids Received (18)   Shortlist (0)   Declined Bids (0)   
Average bid amount:   $36.94   Average delivery time:   2 Day(s)
Place Bid | Post Similar Project | Send Project | Message Board(0) | Contact yboioPirateWorld

Order by:

 

Remember that contacting the other party outside the site (by email, phone, etc.) on all business projects (before the project is awarded) is a violation of our terms of use. We supervise all site activity for such infringements and can immediately expel transgressors on the spot, so we thank you in advance for your cooperation. If you notice a violation please help out the site and report it. Thank you for your help.
 

          nbsp;    
send private message
 
Premium User  
roybuet  
Dhaka, BD
location
US$20
bid amount

9.85/109.85/109.85/109.85/109.85/109.85/109.85/109.85/109.85/109.85/10
(132 reviews)

feedback

0 day(s)
delivery time

 
 
Please check PM. regards
Bid Time: 03-10-2008 08:33
 
send private message
Shortlist
Decline Bid
Premium User  
codigodelsur  
Montevideo, UY
location
US$20
bid amount

9.90/109.90/109.90/109.90/109.90/109.90/109.90/109.90/109.90/109.90/10
(88 reviews)

feedback

1 day(s)
delivery time

 
 
Hi, please check PM.
Bid Time: 03-10-2008 06:48
 
send private message
Shortlist
Decline Bid
Premium User  
TweasontekTeam  
Zaporozhye, UA
location
US$20
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(6 reviews)

feedback

1 day(s)
delivery time

 
 
I'm ready to help you.
Bid Time: 03-10-2008 08:31
 
send private message
Shortlist
Decline Bid
mahmud6120  
dhaka, BD
location
US$50
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(7 reviews)

feedback

1 day(s)
delivery time

 
 
hi..............i am interested...
Bid Time: 03-10-2008 06:39
 
send private message
Shortlist
Decline Bid
shashikhan  
nagpur, IN
location
US$20
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(2 reviews)

feedback

7 day(s)
delivery time

 
 
This can be done
Bid Time: 03-10-2008 04:22
 
send private message
Shortlist
Decline Bid
dorra  
Cluj Napoca, RO
location
US$30
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(2 reviews)

feedback

2 day(s)
delivery time

 
 
Hello! I will provide fully commented sources. I have extensive C++ programming experience. Regards, Dorra
Bid Time: 03-10-2008 08:37
 
send private message
Shortlist
Decline Bid
vicentzhu  
suzhou, CN
location
US$20
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(2 reviews)

feedback

1 day(s)
delivery time

 
 
Please check your pm.
Bid Time: 03-11-2008 01:41
 
send private message
Shortlist
Decline Bid
GFalcon  
Tomsk, RU
location
US$20
bid amount

9.00/109.00/109.00/109.00/109.00/109.00/109.00/109.00/109.00/109.00/10
(2 reviews)

feedback

1 day(s)
delivery time

 
 
I write in C++ professionally since 1995. I can write this in 3 hours.
Bid Time: 03-10-2008 03:38
 
send private message
Shortlist
Decline Bid
sunztech  
Faisalabad, PK
location
US$100
bid amount

5.50/105.50/105.50/105.50/105.50/105.50/105.50/105.50/105.50/105.50/10
(2 reviews)

feedback

1 day(s)
delivery time

 
 
please check my messeage
Bid Time: 03-13-2008 01:01
 
send private message
Shortlist
Decline Bid
akashs20  
Jaipur, IN
location
US$20
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(1 reviews)

feedback

2 day(s)
delivery time

 
 
Hi, i am new to getacoder. But i have good experience in programming. I will do this work... Waiting for your response eagerly...
Bid Time: 03-11-2008 12:15
 
send private message
Shortlist
Decline Bid
Sourav99  
Pune, IN
location
US$100
bid amount

(No Feedback Yet)
feedback

7 day(s)
delivery time

 
 
Can be done....
Bid Time: 03-10-2008 06:31
 
send private message
Shortlist
Decline Bid
gargiprasad  
Bangalore, IN
location
US$100
bid amount

(No Feedback Yet)
feedback

2 day(s)
delivery time

 
 
Please check private message.
Bid Time: 03-10-2008 10:44
 
send private message
Shortlist
Decline Bid
dabee21  
Bienkowice, PL
location
US$20
bid amount

(No Feedback Yet)
feedback

1 day(s)
delivery time

 
 
Nice project would like to finish it.
Bid Time: 03-10-2008 13:58
 
send private message
Shortlist
Decline Bid
kbilal  
na, IN
location
US$20
bid amount

(No Feedback Yet)
feedback

2 day(s)
delivery time

 
 
hi i can positively deliver it before 2 days thanx
Bid Time: 03-10-2008 18:51
 
send private message
Shortlist
Decline Bid
burgeon  
Dhaka, BD
location
US$20
bid amount

(No Feedback Yet)
feedback

1 day(s)
delivery time

 
 
Hi, we can do it. Thanks.
Bid Time: 03-11-2008 01:33
 
send private message
Shortlist
Decline Bid
RomanN  
Lviv, UA
location
US$25
bid amount

(No Feedback Yet)
feedback

1 day(s)
delivery time

 
 
Hi, I've a good experience in such projects.
Bid Time: 03-11-2008 03:55
 
send private message
Shortlist
Decline Bid
smartengineer  
delhi, IN
location
US$40
bid amount

(No Feedback Yet)
feedback

1 day(s)