Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/ / Header protection #pragma once / * * * * * * * * * * * / / * Defines * / /
Header protection
#pragma once
Defines
How to use:
When working on a lab, turn that lab's #define from to
Example: #define LAB
When working on an individual unit test, turn that #define from to
Example: #define DYNARRAYDEFAULTCTOR
NOTE: If the unit test is not on that code will not be compiled!
Main toggle
#define LAB
Individual unit test toggles
#define LABPALINDROMENUMBER
#define LABFILLFILE
#define LABFILLARRAY
#define LABCLEAR
#define LABSORTASCENDING
#define LABSORTDESCENDING
#define LABBRACKETS
#define LABCONTAINSTRUE
#define LABCONTAINSFALSE
#define LABMOVEPALINDROMES
Includes
#include
#include
#include
#include
#include
inline int IsPalindromeNumberunsigned int num
TODO: Implement this function
class DSALab
friend class UnitTestsLab; Giving access to test code
private:
std::vector mValues; contains all of the values
std::vector mPalindromes; contains just the numbers that are palindromes only used in MovePalindromes method
public:
void Fillconst charinputFilename
TODO: Implement this method
void Fillconst intarr, sizet size
TODO: Implement this method
void Clear
TODO: Implement this method
mValues.clear;
void Sortbool ascending
TODO: Implement this method
int operatorint index
TODO: Implement this method
bool Containsint val const
TODO: Implement this method
void MovePalindromes
TODO: Implement this method
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