Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions