Answered step by step
Verified Expert Solution
Question
1 Approved Answer
My question is what code do I write for the for loop? Colorful bubbles Create a Bubble class that has accessors and mutators for an
My question is what code do I write for the for loop?
Colorful bubbles Create a Bubble class that has accessors and mutators for an x and y coordinate, color and size, and a ToString function that prints information about the Bubble object to the terminal. Complete main.cc to build and draw Bubble objects based on user input. Create the Bubble class Fill in bubble.h and bubble.cc to create a Bubble class. Your bubble will need to store private member variables to represent integer x and y coordinates, integer size (the radius), and a graphics::Color color. Bubble needs to have public methods that access and mutate the x, y, color and size (8 methods total: a getter and a setter for each). Finally, Bubble needs a method that returns a std::string representing the bubble. This method should output text with the format, Bubble at (x, y) with size s For example, for a bubble with size 30 at (42, 37), your function would return: Bubble at (42, 37) with size 30 You can use the std::to_string function to convert integers to strings, for example, std::to_string(2) gives "2". bubble.h will need to #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started