Question: / / 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
