Answered step by step
Verified Expert Solution
Link Copied!

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 0 to 1
Example: #define LAB_11
When working on an individual unit test, turn that #define from 0 to 1
Example: #define DYNARRAY_DEFAULT_CTOR 1
NOTE: If the unit test is not on, that code will not be compiled!
*/
// Main toggle
#define LAB_21
// Individual unit test toggles
#define LAB2_PALINDROME_NUMBER 0
#define LAB2_FILL_FILE 0
#define LAB2_FILL_ARRAY 0
#define LAB2_CLEAR 0
#define LAB2_SORT_ASCENDING 0
#define LAB2_SORT_DESCENDING 0
#define LAB2_BRACKETS 0
#define LAB2_CONTAINS_TRUE 0
#define LAB2_CONTAINS_FALSE 0
#define LAB2_MOVE_PALINDROMES 0
/************/
/* Includes */
/************/
#include
#include
#include
#include
#include
inline int IsPalindromeNumber(unsigned int _num){
// TODO: Implement this function
}
class DSA_Lab2
{
friend class UnitTests_Lab2; // 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 Fill(const char*_inputFilename){
// TODO: Implement this method
}
void Fill(const int*_arr, size_t _size){
// TODO: Implement this method
}
void Clear(){
// TODO: Implement this method
mValues.clear();
}
void Sort(bool _ascending){
// TODO: Implement this method
}
int operator[](int _index){
// TODO: Implement this method
}
bool Contains(int _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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions