Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please. CS 372 Points Class Create the point class as shown in the text with a. data members are the one listed in the

C++ please.

image text in transcribed

CS 372 Points Class Create the "point" class as shown in the text with a. data members are the one listed in the text book plus the new ones below Methods in the text: shift, rotate90. rotations needed. distance, middle b. Default "constructor" with two arguments for x and y coordinates c. Add the following methods: Translation: (x.) translated to (xx) by adding x' to x and y' to y value ( y) = (x+x.xv.) where x' & y' are int+ or - or 0 values Scaling: (x, y) = (x.xy') (multiply) where m > 1 makes larger, m 0.0 to 1.0 makes smaller Rotation: 8)=(x cos 8 - y sin 8, x sin 8 + y cos 6) where is the degrees to rotate. Shearing: (x, y) = (x+x': v) to shear in the x direction (x. X+) to shear in the y direction Write a main program that will test the above implementation of points' class and that will convince me your points class is correct. Test all methods in the Points class and show results. Also, set up a box with 4 points:_(2.2) (2,5) (4,5) (4.2) 1. Print out the points for the box. 2. Print out the points for the box after Translating it x'=2 and y'=1 distance. 3. Continuing with new set of box points, print out the box after scaling x by 2 and y by 0.5 4. Original box pts: print out the box after rotating the box by 30 degrees then print again after rotation another 60 degrees. (Note: degrees may need to be converted to radians?) 5. Original box pts: print out the box after shearing in the x direction 1.5 6. Original box pts: print out the box after shearing in the y direction 1.7 Print out and label each of the outputs above. For each output of each box, also draw a picture of the new box (nice accurate boxes)

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

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

Would you recommend this program to your employer? Why?

Answered: 1 week ago

Question

b. Will there be one assigned leader?

Answered: 1 week ago

Question

Do you currently have a team agreement?

Answered: 1 week ago