Question: Sample Output true false true true false true true true false false true true true true false false false false false true true true true
Sample Output
true
false
true true false
true true true
false false true
true true true
false
false
false false false
true true true
true true true
true true true
true
true
true true true
true true true
true true true
false
false
true true true
false true true
false false false
false false false
Graphics:
View Test Case
Sample Input:
Input Format:
The first line of input will contain a single integer denoting the number of test
cases.
Each test case consists of two lines of input, each line contains values separate
by a space and these two input lines represent the set and set objects.
Output Format:
For each test case, there are six lines of output which described as
In line print true or false.
In line print true or false.
In line print a boolean array of size separated by space.
In line to print a table of size by adjacent elements are separated by space.
Constraints:
coordinates points
Programming hints:
The following classes may required:
point
circle
triangle
rectangle
geometry
Input is two copies a point, circle, triangle, rectangle for set and set
A point is defined as
A circle is defined as radius and center point
A triangle is defined as three non collinear points and
A rectangle is defined as two points top left and bottom right
Note: Assume that rectangle sides are parallel to coordinate axes.
listing them gives:
tablesetsetCircle,Triangle,RectangleCirclefalse,false,falseTrianglefalse,true,falseRectangletrue,true,true
In Detail:
In set shapes, the point lie on only in circle and triangle but not in rectangle.
Answer: false.
In set shapes, the point lie on all the three shapes. Answer: true.
Alike shapes in sets : circle circle, triangle triangle, rectangle rectangle.
circle in set intersecting with circle in set so it is true.
triangle in set not intersecting with set so it is false.
rectangle in set is intersecting with set so it is true.
Hence, final answer is a list of boolean as true false true.
Note: Follow the same order when you code. Circle Triangle, Rectangle
In the following table, set shapes and set shapes are mapped and showing
the answers for question
Display of both sets in one D coordinate plane:
Combined:
Set:
Set:
Individual display of set and set geometrical objects in D coordinate
system:
Set:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
