Question: Complete the following requirements in a single C++ program: . Define a structure called Point which will represent an xy coordinate. Point should have 2
Complete the following requirements in a single C++ program: . Define a structure called Point which will represent an xy coordinate. Point should have 2 members, x and y, stored as doubles. . Request xy coordinates from the user. The program should collect xy points until the user enters "q or "Q": The user . Write a function that calculates the average xy point from a list of points passed to the function and return a new point containing this value. Pass your user collected points to this function. If O points are passed to this function . Write a function that finds the maximum distance between any two points from a list of points passed to the function and return that distance. Pass your user collected points to this function. Return -1 if there are 1 or fewer points in . Write a function that computes the largest triangle that can be created from the list of points passed to the function Create a triangle structure that contains three pointers to Point structs and return that structur from the function should be allowed to store as many points as they would like. return a point containing 0,0 as its coordinates the list passed to this function. Distance values returned should always be positive
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
