Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this C++ code and would like to impliment the bonus as well. Thank you! Mandatory Instructions Declare a Circie class that

I need help with this C++ code and would like to impliment the bonus as well. Thank you!

image text in transcribed

image text in transcribed

Mandatory Instructions Declare a Circie class that descibes the size and position of a Circle object on anx, y axis and create a demonstration program to test it 1. First, create a file called lab.h to hold your Circle class definition. Your class should include the private data members and setter and getter function prototypes described below. Don't forget to add the include guard preprocessor statements (#0hdof #dome and endi) to the file. a. Private data membe radius, xPos, yPos b. Public member functions (arrange accessor and mutator functions into two clearly documented groups) - setRadius, serxPos, sety Pos to set the private data members individually - getRadius, getxPos, gety Pos to get the private data members 2. Create a file called laboclient.cpp to test your class. It should include a main function to Define (instantiate) a Circie object called ring a. b. Prompt the user to enter a radius and x, y coordinates for the ring object and store these values in the ring's private data members. c. Display the ring object's radnus, xPos andyPos values, using the getter fumctions to get the values to display Don't forget to include lab.h in this file. Conapile your program (g+labclient.cpp) and test it to make sure it works correctly. each one with your ring object before going on to the next one a. displayCircle displays the radius, xPos and yPos values of a Circle object. Notice this will replace the need for the main 3. Create a file called lab6.cpp to hold the function implementations for the two additional member functions described below. Test function to call the three getter functions to display the objects data. Call this function after you enter values for the radius, and yPos. For example, if you enter 6, 12 and 7 your output should look like this: The Circle object with radius 6 has coordinares (12, 7). b. moveCircle has two parameters used to move the Circle object horizontally and vertically on the x, y axis - The first parameter indicates how much to move the circle to the right (if the value is positive) or left (if the value is negative) Do not use any if statements here! - Th econd parameter indicates how nuch to move the circle up (if the value is positive) or down (if the value is negative). Do not use any if statements here! Tip 1: Don't forget to add a prototype for each function to the Circle class declaration in the lab6.h file. Tip 2: Include lab6h in the file lab6.cpp Tip 3: Use the compile statement. g--lab6.cpp laboclientgp 4. Prompt the user to enter anx move and y move value. Use these values to move the ring object on the , y axis

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+What kind of love? Virtue Appeal

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago