destinee71
20.09.2020 •
Computers and Technology
n this assignment, you will implement two classes. Point: A Point in a two dimensional plane has an integer x coordinate value and an integer y coordinate value. Rectangle: A Rectangle is a class that has three attributes: 1) Point type data that represent the top-left point of the rectangle, 2) integer length and 3) integer width. 1. Write the appropriate class definition for Point class and Rectangle class with necessary constructors, mutator and accessor functions. 2. Write a function that will take two objects of Rectangle class as parameter and return whether they intersect or not. 3. Write a main function that will take inputs from user for two rectangles. Each rectangle requires 4 set of inputs: 1) x of top-left point, 2) y of top-left point, 3) length and 4) width. The main function will return the 4 set of coordinate values of the rectangles and whether they intersect or not. Print the 4 set of co-ordinate values of a rectangle in the following order: Top-left point Bottom-left point Bottom-right point Top-right point Sample Input: x of rectangle 1: 2 y of rectangle 1: 4 length of rectangle 1: 2 width of rectangle 1: 3 x of rectangle 2: 4 y of rectangle 2: 3 length of rectangle 2: 2 width of rectangle 2: 3
Solved
Show answers
More tips
- F Food and Cooking How to Make Thin Pancakes: Recipe and Tips...
- S Style and Beauty Is Hot Scissor Haircutting Beneficial or Dangerous?...
- S Style and Beauty How to Get Rid of Under Eye Bruises?...
- F Food and Cooking Is Bacon Good for You?...
- S Style and Beauty Discover the Art of Nail Design: How Do You Paint Your Nails?...
- P Philosophy How to Develop Extrasensory Abilities?...
- O Other Everything You Need to Know About Kudyabliks...
- C Computers and Internet The Twitter Phenomenon: What it is and How to Use it...
- C Computers and Internet How to Choose a Laptop: Expert Guide and Tips...
- C Computers and Internet How to Choose a Monitor?...
Answers on questions: Computers and Technology
- B Business On January 1, 2017, Crown Company sold property to Leary Company. There was no established exchange price for the property, and Leary gave Crown a $400,000 zero-interest-bearing...
- M Mathematics Plz answer correctly will give brain list which choice correctly identifes the legs and hypotenuse of the right triangle...
- B Biology Andy is sitting on the sofa, quietly reading a book. Which of the following is most likely supplying the majority of his energy right now? a. amino acids b. ice cream c....
- H Health Teens often give in to negative peer pressure because they want to be accepted and may feel awkward. True or False...
Ответ:
How did u get banned?
Explanation: