Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the complete assignment!! C++: Assignment Background : The purpose of this assignment is to practice dealing with string data. The goal is to

I need the complete assignment!!

C++: Assignment

Background:

The purpose of this assignment is to practice dealing with string data. The goal is to work with data declared as char * and also as string. Somehow, I think you'll like working with string much better. Please recall that string is officially known as std::string.

Project 1: Sudoku Row Checker

Sudoku is a logic-based number placement puzzle. The objective is to fill a 99 grid so that each column, each row, and each of the nine 33 boxes (also called blocks or regions) contains the digits from 1 to 9 only one time each. For those of you not familiar with this game, you can learn more about it by clicking here (Links to an external site.)Links to an external site..

The Sudoku Row Checker class is can be used to validate a string of information. Using string operations, it should verify that each number 1 to 9 is used only one time. Following the class diagrams shown below, implement the Sudoku Row Checker class. Embed your class in a suitable test program that proves your calculations are correct. You may choose to create any number of additional methods, but you are required to implement all of the public methods shown below. You are free to ignore the private parts of the class I suggest below.

Implementation Details

Sample Driver Code

SudokuRowChecker

SudokuRowChecker checker; checker.setData( "123456789" ); if (checker.isValid()) { cout << "looks good!"; } else { cout << "looks bad!"; } checker.clear( ); checker.setStringData("12345678901"); if (checker.isValid()) { cout << "looks good!"; } else { cout << "looks bad!"; } checker.clear( ); checker.setData( "123456799" ); if (checker.isValid()) { cout << "looks good!"; } else { cout << "looks bad!"; }

SudokuRowChecker( ); void setData( char * s ); void setStringData( std::string s ); void clear(); bool isValid( ) const;

std::string sudokuRow;

Sample Output

looks good! looks bad! looks bad!

Overall

Your submission should follow this organization:

main.cpp

checker.h

checker.cpp

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

More Books

Students also viewed these Databases questions

Question

What is the nature and type of each key public?

Answered: 1 week ago

Question

6. What questions would you suggest should be included?

Answered: 1 week ago