Question: Part B: n-point template class. Create a new project. You MUST define your methods outside the class definition, but don't forget that full method definitions
Part B: n-point template class. Create a new project. You MUST define your methods outside the class definition, but don't forget that full method definitions must be in the header for template classes. 1. In this problem, you'll make a template class for an n-dimensional point; that is, points with 2,3,4, etc. coordinates, up to 10 . For example, you could have any of the following: - A two-dimensional point of ints, like (2,6) - A five-dimensional point of strings, like ("Hello", "how", "are", "you", "today") Your class should have private members as follows: a static array of size 10 , and a variable that holds the dimension of the point. Also include: - Three constructors: one constructor that takes 0 arguments, one that takes in just the dimension of the point, and one that takes in the dimension of the point and an initializing array. - A single getter that returns the ith item in the tuple - A getter for the size Test your functions in your main(). Copy your code into your lab report. Be sure to get your work approved before moving on. 2. Overload the = operator for your class as a member. Write a comment explaining which operations the type variable needs to support for your code to work. Your = function should be void. Test your function in your main(). Copy your code into your lab report. Be sure to get your work approved before moving on
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
