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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:20, capo9972
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
image
Computers and Technology, 23.06.2019 09:00, opgbadwolf5
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, abdulbasharee99
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
image
Computers and Technology, 23.06.2019 12:10, jefersina16
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
Do you know the correct answer?
n this assignment, you will implement two classes. Point: A Point in a two dimensional plane has an...

Questions in other subjects:

Konu
Mathematics, 20.10.2020 03:01
Konu
Spanish, 20.10.2020 03:01