From f0ab2ba304bbb24fe0c723835544473fa071c510 Mon Sep 17 00:00:00 2001 From: Trygve Date: Wed, 13 Mar 2024 01:52:28 +0100 Subject: [PATCH] 20 --- lab_3/20.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lab_3/20.md diff --git a/lab_3/20.md b/lab_3/20.md new file mode 100644 index 0000000..932e934 --- /dev/null +++ b/lab_3/20.md @@ -0,0 +1,13 @@ +# Do you want any of your classes to act as a container for objects of the other classes? +I will use Configuration as a container for the Board and a vector of Pieces. + +# For which of the classes would you write aconstructor (or multiple constructors)? +I will write a constructor for the Configuration class to set up the whole board. +The Piece class will have a constructor to make it easier to create. The queen inherits its constructor from Piece. +The Board class does not need a constructor as i am only creating it once. + +# A destructor? +I will write a destructor for the configuration class because it holds a pointer to a Board object. + +# A copy constructor and copy assignment operator? +I will write a copy constructor and copy assignment operator for the Configuration class because it holds a pointer to a Board object. \ No newline at end of file