"Human vs. Human Tic Tac Toe" Assignment:

Write a game of Tic Tac Toe using the Tic Tac Toe demo program found in our website.

The program must allow two people to play a game of tic tac toe. Add the following features for full credit:

- each players' inputted moves are checked & validated to ensure that they are making legal moves (not overwriting a previous move or attempting to move off the board),
- if a player makes an illegal move, he is required to input a legal move,
- the game ends when appropriate and announces who the winner was (x or o) or if the game ended in a draw,
- the board is displayed after each move is made,
- the demo program cited above with its one dimensional array named board must be used as the basic structure of this program (do not plagiarize or use another program)

This assignment will be graded on style & efficiency.

No pseudocode or test plan must be submitted with this assignment, however your program must be consistent with any sample test plan cases that may have been developed or discussed in class.

You must add the line    system("pause");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a5.cpp) & the executable file (named a5.exe) to the appropriate drop box in Angel (look under the Lessons tab) by the beginning of the Final Exam class period.


"Human vs. Computer Tic Tac Toe" Assignment:

Write a game of Tic Tac Toe using the Tic Tac Toe demo program found in our website.

The program must allow a human user to play against the computer with the user being x's and the computer o's. The user should go first. Add the following features for full credit:

- the computer's moves are random and legal,
- the human player's inputted moves are checked & validated to ensure that each position is a legal move (not overwriting a previous move or attempting to move off the board),
- if the human player makes an illegal move, he is required to input a legal move,
- the game ends when appropriate and announces who the winner was or if the game ended in a draw,
- the board is displayed after each move is made,
- the demo program cited above with its one dimensional array named board must be used as the basic structure of this program (do not plagiarize or use another program)

This assignment will be graded on style, efficiency, and a curve based on how your program compares to that of other students.

No pseudocode or test plan must be submitted with this assignment, however your program must be consistent with any sample test plan cases that may have been developed or discussed in class.

You must add the line    system("pause");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a6.cpp) & the executable file (named a5.exe) to the appropriate drop box in Angel (look under the Lessons tab) by the beginning of the Final Exam class period.


"Human vs. Computer Tic Tac Toe with Artificial Intelligence" Assignment:

Write a game of Tic Tac Toe using the Tic Tac Toe demo program found in our website.

The program must allow a human user to play against the computer with the user being x's and the computer o's. The user should go first. Add the following features for full credit:

- the computer's moves are random and legal,
- the user's inputs are checked (i.e. validated) to ensure that each position is legal,
- if the user makes an illegal move, he is required to input a legal move,
- the game ends when appropriate and announces who the winner was or if the game ended in a draw,
- the board is displayed after each move is made,
- the demo program cited above with its one dimensional array named board must be used as the basic structure of this program (do not plagiarize or use another program),
AND
- the computer blocks the human when the human is one move away from a win

This assignment will be graded on style & efficiency.
You must add the line    system("pause");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a7.cpp) & the executable file (named a5.exe) to the Assignment #5 Drop Box in Angel (look under the Lessons tab) by the beginning of the Final Exam class period.


"Using Files" Assignment:

Modify Assignment #3 with the following, additional specifications. The customer's orders will be read as integers from a file named inputdata.txt. You can assume that inputdata.txt is in the same folder as the exe file. The data in that file will consist of separate integers on separate lines. For example, the file


1
1
2
1
3
1
4

would cause one of each item to be ordered. The data

3
89
3
1.5
4

would cause 1.5 pounds of peanuts to be ordered since the 89 is an invalid quantity.

The output must be written to another file named ouputdata.txt. No output should be displayed on the monitor. Only the total price should be written there with no other words or symbols such as a $. This program should not create a fancy, ASCII-art receipt. You may have to specify full file paths when declaring the input and/or output file pointers. See the instructor if you need help with that.

No pseudocode or test plan must be submitted with this assignment, however your program must be consistent with any sample test plan cases that may have been developed or discussed in class.

You must add the line    system("pause");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a8.cpp) & the executable file (named a5.exe) to the Assignment #5 Drop Box in Angel (look under the Lessons tab) by the beginning of the class period on the due date.


Assignment #6:

Modify Assignment #3 with the following, additional specifications. The items' prices will be read as numeric values on separate lines from a file named prices.txt. The items' shipping prices will be read as numeric values on separate lines from a file named shipping_prices.txt. All shipping prices for this assignment will be flat, per item shipping costs. The items' descriptions will be read as one-word strings on separate lines from a file named items.txt. The menu will be created based on the data in items.txt which is guaranteed to have 100 or fewer items. You can assume that the external data files are in the same folder as the exe file. The customer will type input from the keyboard and the final total price must be displayed rounded to the nearest penny. The last menu option must be described as "Checkout". For example, if there are 10 items listed in items.txt then menu option #11 will be "Checkout". You can assume that all 3 data files will have the same number of lines.

You must use 2 or more additional functions which are stored in an include file named "functions.h" that is stored in the same folder as your a6.cpp file.

You may have to specify full file paths when declaring the input and/or output file pointers. See the instructor if you need help with that.

No pseudocode or test plan must be submitted with this assignment, however your program must be consistent with any sample test plan cases that may have been developed or discussed in class.

You must add the line    system("pause");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a9.cpp) & the executable file (named a6.exe) to the appropriate drop box in Angel (look under the Lessons tab) by the beginning of the class period on the due date.


Assignment #7:

Modify Assignment #6 with the following, additional specifications. The items prices, shipping prices, and descriptions will be stored as columns in a nicely-formatted spreadsheet that includes column headings. You must manually export that data to a single tab-delimited named a7input.txt that is then read by your program to obtain pricing and description information. Create and use a professional-looking, neatly formatted Excel or other type of spreadsheet as the basis of your exported tab-delimited file. The format of the spreadsheet file must allow for an unspecified number of rows above the data to be used for a nicely-formatted spreadsheet (corporate logo, company name, column headings, etc.) You are guaranteed that the important data in the file will be in the format

Books  9.00  1.03
Movies  13.99  .7
Peanuts 1.80  .5

where the data elements are in separate spreadsheet cell entries. You are guaranteed that the last character in the row above your first item contains a ~ symbol. You will need to check for that symbol in order to determine where the real data begins. You are also guaranteed that there will be no extraneous data below the row with the last element.

You may have to specify full file paths when declaring the input and/or output file pointers. See the instructor if you need help with that.

No pseudocode or test plan must be submitted with this assignment, however your program must be consistent with any sample test plan cases that may have been developed or discussed in class.

You must add the line    system("PAUSE");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a10.cpp) & the executable file (named a7.exe) to the appropriate drop box in Angel (look under the Lessons tab) by the beginning of the class period on the due date.


Assignment #8:

Modify Assignment #7 with the following, additional specifications. The original data must be exported from an Excel or other type of spreadsheet as a comma-delimited file named a8input.csv that is read by your program to obtain pricing and description information.

You may have to specify full file paths when declaring the input and/or output file pointers. See the instructor if you need help with that.

No pseudocode or test plan must be submitted with this assignment, however your program must be consistent with any sample test plan cases that may have been developed or discussed in class.

You must add the line    system("pause");    right before     return 0;      in order to receive any credit for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.

You must also upload copies of the source file (named a11.cpp) & the executable file (named a8.exe) to the appropriate drop box in Angel (look under the Lessons tab) by the beginning of the class period on the due date.