Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write COW List with C + + . Write a single function: remove ( ) o Signature and structure need exactly the same o Place
Write COW List with C
Write a single function: remove
o Signature and structure need exactly the same
o Place function in file named see supplied files:
Boustrophedonic.cpp : Function
Boustrophedonic.h : Declaration and structure
o Your list will be tested with different dimensions
Make sure you solve the problem in a generalized way without crashing
o You cannot modify the Node.h in any way.
Its needed in the unit tests as is
o You can add helper functions to Boustrophedonic.h and Boustrophedonic.cpp
All your work should be done in Boustrophedonic.cpp
o Make sure you are not leaking memory
You should delete the Node in your remove function
o Check both Debug and Release mode
o Boustrophedonic list is complete and PRISTINE before you remove one node
o Only ONE node will be removed in the function
o The dimensions of the list are NOT given
o Boustrophedonic list has an even number of columns
o Boustrophedonic list has no restrictions on number of rows
o On deletion, horizontal and vertical connections are preserved across the deleted node
Node.h
DO NOT MODIFY
#ifndef NODEH
#define NODEH
struct Node
public:
Node;
Nodeconst Node & delete;
Node &operator const Node & delete;
~Node;
public:
Node pNorth;
Node pSouth;
Node pEast;
Node pWest;
;
#endif
End of File
Node.cpp
DO NOT MODIFY
#include "Node.h
Node::Node
: pNorthnullptr
pSouthnullptr
pEastnullptr
pWestnullptr
Node::~Node
End of File
Boustropehedic.h
#ifndef BOUSTROPHEDICH
#define BOUSTROPHEDICH
#include "Node.h
class Boustropehedic
public:
static void RemoveNode &head, int row, int col;
Add extra methods here if desired:
;
#endif
End of File
Boustropehedic.cpp
#include "Boustrophedonic.h
void Boustropehedic::RemoveNode &pHead, int row, int col
TODO
End of File
Please fix Boustropehedic.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started