Question: For this question, you must create and test a class called Points2. This class describes a sequence of 2D points. Example 1: (1,3), (4, 5)

 For this question, you must create and test a class called

For this question, you must create and test a class called Points2. This class describes a sequence of 2D points. Example 1: (1,3), (4, 5) is a sequence of two points, where each coordinate is an integer. Example 2: (1.2, 3.4), (5.6, 10.1), (11.1, 12.0) is a sequence of three points where each coordinate is a double. The sequence can be of arbitrary size and can . An empty sequence has size 0. The purpose of this assignment is to have you create a Points2 class from scratch with limited help from the STL. Since Points2 can have arbitrary size, you should use pointers. The private data members should be: size_t size; std::array *sequence_; Object is the template type parameter (i.e int, double, etc.). An initial piece of code with the structure of the class is provided. Do not change the data representation (for instance do not use a vector or list to represent the sequence). Pay special attention to Weiss's "Big-Five", the destructor, copy constructor, copy assignment operator, move constructor and move assignment operator. Included are the two files (points2.h, test_points2.cc) you will need, as well as the Makefile. Do not modify the Makefile or the file names. Do not modify the test points2.cc file except by changing or adding include files if needed. You can comment in the main file the parts you didn't complete. The points2.h file is not complete. The file provides details on where to provide changes must be made. You are also provided with a sample input file test_input_file.txt and an explanation on how to use it is provided at the end of this document. For this question, you must create and test a class called Points2. This class describes a sequence of 2D points. Example 1: (1,3), (4, 5) is a sequence of two points, where each coordinate is an integer. Example 2: (1.2, 3.4), (5.6, 10.1), (11.1, 12.0) is a sequence of three points where each coordinate is a double. The sequence can be of arbitrary size and can . An empty sequence has size 0. The purpose of this assignment is to have you create a Points2 class from scratch with limited help from the STL. Since Points2 can have arbitrary size, you should use pointers. The private data members should be: size_t size; std::array *sequence_; Object is the template type parameter (i.e int, double, etc.). An initial piece of code with the structure of the class is provided. Do not change the data representation (for instance do not use a vector or list to represent the sequence). Pay special attention to Weiss's "Big-Five", the destructor, copy constructor, copy assignment operator, move constructor and move assignment operator. Included are the two files (points2.h, test_points2.cc) you will need, as well as the Makefile. Do not modify the Makefile or the file names. Do not modify the test points2.cc file except by changing or adding include files if needed. You can comment in the main file the parts you didn't complete. The points2.h file is not complete. The file provides details on where to provide changes must be made. You are also provided with a sample input file test_input_file.txt and an explanation on how to use it is provided at the end of this document

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!