subject

In this assignment, you wil implement two classes. 1. Point: A Point in a two dimensional plane has an integer x coordinate ad an integery 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. 2. Write the appropriate class definition for Point class and Rectangle class with necessary c 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 returr 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: 1. Top-left point 2. Bottom-left point 3. Bottom-right point 4. 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: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
When determining the classification of data, which one of the following is the most important consideration? a. processing systemb. valuec. storage mediad. accessibility
Answers: 2
question
Computers and Technology, 22.06.2019 12:50
You have just been hired as an information security engineer for a large, multi-international corporation. unfortunately, your company has suffered multiple security breaches that have threatened customers' trust in the fact that their confidential data and financial assets are private and secured. credit-card information was compromised by an attack that infiltrated the network through a vulnerable wireless connection within the organization. the other breach was an inside job where personal data was stolen because of weak access-control policies within the organization that allowed an unauthorized individual access to valuable data. your job is to develop a risk-management policy that addresses the two security breaches and how to mitigate these risks.requirementswrite a brief description of the case study. it requires two to three pages, based upon the apa style of writing. use transition words; a thesis statement; an introduction, body, and conclusion; and a reference page with at least two references. use a double-spaced, arial font, size 12.
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
You know the right answer?
In this assignment, you wil implement two classes. 1. Point: A Point in a two dimensional plane has...
Questions
question
Mathematics, 18.12.2020 22:30
question
Mathematics, 18.12.2020 22:30
question
Mathematics, 18.12.2020 22:30
Questions on the website: 13722363