COMP 2014 - Object-oriented Programming

Download Solution Order New Solution

Assignment Task

1. Download the code which is the same as n3.cpp but written in object-oriented style. Prepare your answer to all the questions in the code (the comments associated to related functions or statements) and show your answer to your tutor.

2. Change C++ code to OO-style by creating a class, named “OneDArray”, with an array of int and numberUsed as data members and the existing function as a method. Add more data members or methods if needed. Simplify the main function as a class driver (the shorter the better).

3. Extend your code for so that the moves of X player are randomly generated while the moves of O player are taken from human input.

4. You may simply move the functions - play, getXMove, and getOMove - from class TicTacToe to this class with minor but necessary changes. Make proper changes in the main function so that the whole program works the same as your code for task 3.

This IT Computer Science has been solved by our PhD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.