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;    

 


 
Get the Free Step-by-Step Guide on How to Use GetACoder
The act of outsourcing projects has become easy in the past few years thanks to GetACoder. However, our team aims at making the whole process even easier. So, it has now come the time to provide you with a step-by-step guidance on how to use this service and succeed in the outsourcing world totally for FREE.

It doesn’t matter if you are a more experienced user or a novice; using GetACoder will become even simpler with the help of this E-book. There are two major sections: a Buyers section and a Coders section.

Buyers will learn:
  • How to outsource safely
  • How to pick the best freelancers
  • How to manage time and money

Coders will learn:

  • How to get the best projects
  • How to secure their payments
  • How to build a long-lasting relationship with buyers

    …and  MUCH MORE
Clear examples and pictures illustrating key situations, great tips and real testimonies of some of our best users… all in this Outsourcing Guide.  So don’t loose the outstanding opportunity to download GetACoder FREE E-book.
The Outsourcing Revolution: Why It Makes Sense and How to Do It Right
The Outsourcing Revolution: Why It Makes Sense and How to Do It Right
What is GetACoder?

GetACoder.comGetACoder is a leading Global Services Marketplace doing business in more than 200 countries. Our unique system accelerates your time to market and provides your business with key competitive advantages. When you use GetACoder you are stretching your budget and saving as much as 60% over traditional outsourcing. GetACoder is changing business, now it's no longer about what you own or build but which resources and talent you can access. With GetACoder you reduce expenses, increase efficiencies, aggressively grow your business, and create a sustainable competitive advantage. GetACoder makes outsourcing to any part of the world an easy task! With GetACoder it's simple to outsource any business project, gain access to global talent and manage projects online.

One of the main advantages of GetACoder is the low labor cost. The typically rates are about seven times lower than the ones in the US or Europe. Posting a project at GetACoder allows the right professional or company to find you and to bid for your work. We are building a reputation for exceeding our customers' expectations and for becoming an extremely cost effective way to outsource work. Use GetACoder when you want to save money, increase efficiency or accelerate the development of your project. With GetACoder you focus on growing your business and let others do the tedious work. Post your project on GetACoder for free. Find out why people outsource projects with us day after day.

Thousands of Satisfied Customers - Submit/View Quotes


-So far I cannot fault this site, its service and the response rate is generated within minutes. After 20 years getting programmes and web sites off the ground, I'm astounded it has taken so long to come across this service. On reflection I could have made fortunes and saved a lot of headaches if GetACoder had been around a few years ago!! - microchipmick
-Thank you for providing an excellent trade platform. - frlnJames
-GetACoder is an amazing site which integrates Knowledge, Technology and People. - bizcomptech
Report Violation    Privacy Policy     Affiliate Program    Terms of Use    Contact Us    Help      GetACoder.com Latest Projects RSS Feed
© 2004-2008 GetACoder. All rights reserved.