Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Testing: Add a main method to your file to create some tests of your code. Testing shiftRight: Create at least 2 test arrays with

C++

image text in transcribed

Testing: Add a main method to your file to create some tests of your code. Testing shiftRight: Create at least 2 test arrays with different numbers of strings. Before each test use your printArray function to show the original order of the array. Then call the function with the test array. In one test you should shift all the values in the array. In another test you should pass a string count smaller than the length of the array. (In this one you are only shifting some of the items.) After each test use your printArray function to show the resulting array. Testing reverseDigits: Create at least 2 tests. Before each test print out some output showing what your argument will be. After each test print out the resulting value. Submission: Submit your assignment2.cpp code file and a screenshot of the output after running the file. Make sure to include your name in a comment at the top of the code file. The screen shot should contain just the output/console area showing the output from running the file. Grading: Your code will be graded on functionality and readability. Functionality is defined as following the function requirements as outlined here. Please ask questions if you aren't sure what a function or test should do. Some things I will be looking for in terms of readability: good use of variables and variable naming, reasonable use of comments, whitespace to create easy to read code. (For example each function should have at least one empty line between them. I would expect the tests for the different sections to have a blank line between them. I might expect the test sections to have a line with a comment with some explanation or even just a header like "shiftRight tests".)

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions