subject

In 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. Write the appropriate class definition for Point class and Rectangle class with necessary constructors, mutator and accessor functions. Write a function that will take two objects of Rectangle class as parameter and return whether they intersect or not. 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 Sample Output: Co-ordinates of rectangle 1: (2,4), (2,2), (5,2), (5,4) Co-ordinates of rectangle 2: (4,3), (4,1), (7,1), (7,3) They intersect.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 14:30
The egyptians invented the ? to water their crops, and may have used the ? to build the pyramids.
Answers: 1
question
Computers and Technology, 22.06.2019 04:40
Amain idea is supported, explained, or expanded on with a numbers b. a concluding statement c. details d. a topic sentence. im e paragraphs reset nex next
Answers: 2
question
Computers and Technology, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
You know the right answer?
In this assignment, you will implement two classes. Point: A Point in a two dimensional plane has an...
Questions
question
Mathematics, 06.03.2020 22:21
question
Mathematics, 06.03.2020 22:21
question
Mathematics, 06.03.2020 22:22
Questions on the website: 13722363