Use the same UML as below and make extensions as necessary You will follow the steps below which…

Use the same UML as below and make extensions as necessary

You will follow the steps below which are exactly the same. So you can build on the code that you have already created. However, after you display the count using the getCount() method and vector size method, you will practice the vector erase and insert methods to erase and insert Circle objects. The instructions denoted by -> are what you will work on.You will also create a simple, basic destructor for the Circle class.

Circle

-int x //x coord of the center

-int y // y coord of the center

-int radius

-static int count // static variable to keep count of number of circles created

+ Circle() //default constructor that sets origin to (0,0) and radius to 1

+Circle(int x, int y, int radius) // regular constructor

+getX(): int

+getY(): int

+getRadius(): int

+setX(int newX: void

+setY(int newY): void

+setRadius(int newRadius):void

+getArea(): double // returns the area using formula pi*r^2

+getCircumference // returns the circumference using the formula 2*pi*r

+toString(): String // return the circle as a string in the form (x,y) : radius

+getDistance(Circle other): double // *** returns the distance between the center of this circle and the other circle

+moveTo(int newX,int newY):void // *** move the center of the circle to the new coordinates

+intersects(Circle other): bool //*** returns true if the center of the other circle lies inside this circle else returns false

+resize(double scale):void// ***multiply the radius by the scale

+resize(int scale):Circle // ***returns a new Circle with the same center as this circle but radius multiplied by scale

+getCount():int //returns the number of circles created

//note that the resize function is an overloaded function. The definitions have different signatures

A. Extend the driver class to do the following:

  1. Declare a vector of circles
  2. Call a function with signature inputData(vector
  3. Use istringstream to create an input string stream called instream. Initialize it with each string that is read from the data file using the getline method.
  4. Read the coordinates for the center and the radius from instream to create the circles
  5. Include a try catch statement to take care of the exception that would occur if there was a file open error. Display the message “File Open Error” and exit if the exception occurs
  6. Display all the circles in this vector using the toString method
  7. Use an iterator to iterate through the vector to display these circles
  8. Display the count of all the circles in the vector using the getCount method
  9. Display the count of all the circles in the vector using the vector size method
  10. -> Erase all circles which have a radius greater than 8
  11. -> Display the number of circles remaining using vector size method
  12. -> Display all the circles remaining using toString()
  13. -> create Circle object circle1 at (3,4) and radius 7
  14. -> create a Circle object circle2 at (-2,-4) and radius 4
  15. -> insert these circles into the vector at positions 2 and 3 respectively
  16. -> Display the vector of circles
  17. -> Write a simple destructor in the Circle.cpp class that simple displays

“In Destructor”

B. Write functions in your main driver cpp file that perform the actions 10-17 Your code should be modular and your main program should consist primarily of function calls

C. Make sure your program has good documentation and correct programming style

D. Your program needs to follow top down design and abide by the software engineering practices that you mastered in

Data File:

0 0 4
0 0 12
– 2 -9 11
4 5 7
7 8 9
2 -5 11

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

The circles created are (0,0):4 (0,0):12 (-2,-9):11 (4,5):7 (7,8):9 (2,-5):11

The number of circles, using getCount method is 6

The numher of circles, using vetor size method is 6 .

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

The number of circles remaining is 2

The circles left are : (0,0):4 (4,5):7

Inside Destructor

Inside Destructor

The circles vector now has these circles : (0,0):4 (3,4):7 (-2,-4):4 (4,5):7

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Inside Destructor

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Online Academic Experts
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Nursing
It was a very long paper, but she followed all the instructions, and she even finished the paper 5 days before the due date. Will write an essay with her again, thanks!
Customer 452967, November 27th, 2021
English 101
IThank you
Customer 452631, April 6th, 2021
Health Care
awesome work
Customer 452777, October 14th, 2021
Human Resources Management (HRM)
Very well written and very impressed with this service!
Customer 453077, February 16th, 2022
Psychology
Thank you!
Customer 452545, February 6th, 2021
Human Resources Management (HRM)
My son and I have been sick for two weeks, of course at the end of my semester. I am so grateful that myhomeworkgeeks were able to help! Both papers got A's and I couldn't be more thrilled! Thank you so much and don't forget to tip your writer!
Customer 453077, February 22nd, 2022
Nursing
Paper much better compared to the one prior revision request. References need to be no more than the past 5 years.
Customer 452547, July 20th, 2021
Social Work and Human Services
Great work I would love to continue working with this writer thought out the 11 week course.
Customer 452667, May 30th, 2021
Psychology
Came in as promissed. Good paper.
Customer 453027, January 6th, 2022
Business Studies
First of all, the writer made sure that he completely understood my assignment and all the guidelines before he began writing. My paper was finished very fast and well before the specified deadline. I thought it was written excellently. He definitely completely grasped the topic. Overall, he is a great writer and I couldn't have asked for better.
Customer 452441, November 29th, 2021
Nursing
Thank you
Customer 453087, March 5th, 2022
Human Resources Management (HRM)
I finished the first deliverable of a project presentation but had no time to finish my second deliverable. The writer revamped my first deliverable and made it much more appealing! Not only was I impressed with the content but I was so grateful for the time they took to redo the background. I have been under a lot of pressure at work and at home so this has been a great service when I have had little time! I appreciate the detail and help! Always on time and always exceeding expectations!
Customer 453077, April 5th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
AllEscortAllEscort
Live ChatWhatsApp
AllEscort