代写计算机编程作业-WM908-10 01代写-Programming代写
代写计算机编程作业

代写计算机编程作业-WM908-10 01代写-Programming代写

Post Module Assignment Submission and Declaration form

代写计算机编程作业 In this assignment you will develop a tic tac toe (also called noughts and crosses) program over a number of steps.

MODULE TITLE: Fundamentals of Computer Programming

MODULE DATES: 11th – 15th December 2017

MODULE CODE: WM908-10 01

STUDENT ID NUMBER:

NB: Late submission of coursework without approval for an extension will result in marks being deducted at the rate of 3 percentage points per University working day after the due date, up to a maximum of 10 University working days late. After this period the work may be counted as a non-submission.

All work may be submitted to the Automated Source Matching Software. The use of this service, along with other methods of maintaining the integrity of the academic process, will help the University maintain academic standards and assessment fairness.

In submitting my assessed work I declare that:

1.I have read the guidance on plagiarism/cheating provided in the Handbook and understand the University regulations in relation to plagiarism/cheating. I am aware of the potential consequences of committing plagiarism/cheating. I declare that the work is all my own, except where I have stated otherwise.

2.Nosubstantial part(s) of the work submitted here has also been submitted by me in other assessments for accredited courses of study (other than in the case of a resubmission of a piece of work), and I acknowledge that if this has been done an appropriate reduction in the mark I might otherwise have received will be made.

3.I understand that should this piece of work raise concerns requiring investigation in relation to points 1. and/or above, it is possible that other work I have submitted for assessment will be checked, even if the marking process has been completed.

I have used a proof-reader, paid or unpaid, to support the submission of this assignment:

Yes
No

 The University expects all proof-readers to comply with its policy in this area. By ticking ‘yes’, you confirm that the proof-reader was made aware of and has complied with the University’s proofreading policy (http://www2.warwick.ac.uk/services/aro/dar/quality/categories/examinations/ policies/v_proofreading/)

Student Signature: ………………………………….………….………………… Date: ………………………………………………

WMG MSc PROGRAMME POST MODULE ASSIGNMENT 代写计算机编程作业

Fundamentals of Computer Programming

In this assignment you will develop a tic tac toe (also called noughts and crosses) program over a number of steps. The program needs to be developed in C++ and the code submitted with a report, details of which are outlined below. An executable should be submitted also.

Please read the entirety of the assignment before attempting any part of it as thinking about the overall solution from the start will be beneficial for some of the later stages.

For all parts even if you do not get the final result, show your code. If there is no code at least explain your reasoning. Marks will be given for any of these – more for proper code that works. If you cannot provide the full functionality at any stage, provide part of it but state what part was provided.  计算机编程代写

Structure your report in a manner similar to this document. If a section asks for code and a comment, use the same sub-heading and provide the items requested in that same sub-heading. When asked to output results you can use an application such as the snipping tool in Windows to directly paste the results in your document – this is very quick.

Provide comments in the code – the more readable it is the easier it is to understand and allocate marks.

Make sure you do not copy any code from the internet or online resources.

Overview  代写计算机编程作业

The following must be provided and is outlined in individual sections (numbers correspond to sections), details of each one is explained in the individual section:

  1. Basic functionality for displaying and placing a piece on the board [20marks]
  2. Functionality for having two players play the game [15marks]
  3. Functionality for (easy) AI that can play against itself or a player [10marks]
  4. Functionality to identify when somebody has won the game [20marks]
  5. Either [25marks]

a.A 1000 word write up on expectations of computing in yourarea

b.Functionality for having boards of any sizedynamically

7.A report outlining all of the above [10marks]

代写计算机编程作业
代写计算机编程作业

Basic Functionality (20 marks)

Unless otherwise specified the game board is a 3 x 3 board as below:

Note this shows a particular style of displaying the board – other styles are possible.

Create a class called tictactoe that encapsulates the functionality of the playing board.

First describe how it is best to represent the noughts (‘O’) and crosses (‘X’) – i.e. what structure you used. Show the representation you used inside your report. Initialise this structure with a value representing that point as empty. When displaying an empty cell use ‘ ‘.

Add the following functionality to class tictactoe: 代写计算机编程作业

A member function bool setXY(unsigned int x, unsigned int y) which sets a ‘O’ or ‘X’ on the board at the desired location. This function only sets a value to that location if and only if there is no other ‘O’ or ‘X’ there. If a ‘O’ or ‘X’ already exists, the function returns false. If the co- ordinates are out of bounds it also returns false. If the previous conditions are not met, it sets the correct symbol on the board and returns true. Maintain functionality inside the tictactoe class to switch between ‘O’ and ‘X’ after every turn. Show the code for setXY(). The co-ordinates should be indexed starting from 0 such that (1, 1) is the centre of the board.

Provide a member function display() that displays the board at its current state when called. Show this working, at first when empty as shown above and then after one, two and five inputs as shown below. Show the code for display() in the report.

Show the lines of code used to test and debug if the above was working correctly.

3 Adding players (15marks)

From this section onwards, you will not be asked to create classes but you can do so if you feel it benefits the program. You will be evaluated on these decisions as well, so explain them when needed.

Create functionality for two players to interact with the tictactoe class. This needs to be outside of that class.

In the first part, the player should call tictactoe::setXY(x,y) where x and y are input from the keyboard. If tictactoe::setXY(x,y) returns false ask the player to input again. If tictactoe:: setXY(x,y) returns true then display the screen with the updated position. Show code for this functionality provided.

A successful attempt would look like:

代写计算机编程作业
代写计算机编程作业

Out of bounds example:

Another example where the player attempts to play at a position that is already occupied.

代写计算机编程作业
代写计算机编程作业

Add functionality for two players. Show this running. An example is:

Finally ensure no more moves can be played when the board is full. Show code for this test.

(Note: at this stage the program is not testing for a winning condition automatically – this is a bit harder and will be done in Section 5. The players can decide between themselves when someone has won but the program should now end when the board is full.)

Adding easy AI (10 marks)

Add functionality for an AI that replaces one of the players – AI in this sense means – let the computer play instead of one of the players. The AI is dumb, it does not play intelligently and just randomly places a piece when it is its turn to play. The AI as with the player should interface with tictactoe::setXY(x,y). The AI must also try again when it makes a mistake until it succeeds.  Show code for how the AI tests and tries again.

Provide the capability for the AI to interact with the human/player with the following functionality (as well as AI vs AI and human vs human):

As with 1.3, make sure the program stops when the board is full. Show code for all of the above and output results.

Testing a Winning Condition (20 marks) 代写计算机编程作业

Provide a new function bool tictactoe::isWinner() to test whether a player has won the game. Stop the game when this has happened and declare a winner. An example is (Player 1 just played (0, 1) which has won him/her the game):

This part requires some careful thinking. Explain what all the conditions where to lead you to declare a winner and show the code.

More marks will be given for implementations considered efficient. Show code and output results.

Two Options (25 marks)

Choose one of the following two options. Either 6.1 or 6.2:

6.1 Essay

Write a 1,000-word essay on:

“From what you learnt this week on how computers and algorithms work, their capabilities and their limitations, how will this technology affect your field in the next 25 years and what are the main challenges that computers can help resolve.” 代写计算机编程作业

By your field I mean the area you are doing your MSc in. Have this reasonably well resourced with citations if and where necessary.

6.2 Dynamic creation of grid sizes

Provide functionality for the user to input the size of the board at the beginning. This needs to be done by using dynamically allocated memory (see the C++ functions and pointers tutorial). Their functionality to handle data can be researched and they can be used for this part of the program. Functionality must be provided for the user to start again at the end of the game as seen below:

Show output for the game playing at various sizes including 2×2:

and one at 15×15:

代写计算机编程作业
代写计算机编程作业

Furthermore analyse the performance of your method bool tictactoe::isWinner() and ensure that it works for any case. Show code for the parts changed and the requested output in particular tictactoe::isWinner().

Report (10 marks) 代写计算机编程作业

The report should contain all the details and code as requested in the rest of the document. As mentioned above, structure your report similarly to this document, whereby if a section asks for code and a comment, use the same sub-heading and provide the items requested in that same sub heading. When asked to output results you can use an application such as the snipping tool in Windows and paste the results in your document – this is very quick.

Also add to the report a small section on your choice of classes if you used more than the

tictactoe class, why you chose them and how they interact.

DEADLINE:

To be submitted electronically via Tabula BEFORE 09:00 on 5th February 2018

PLEASE NOTE:

1. PMW that is received after 09:00, will be recorded at having arrived the next working day.

2.PMW that is not submitted on Tabula by the deadline on the due date, willbe considered late. Penalties for lateness is applied at the rate of 3 percentage points per university working day after the due date, up to a maximum of 10 university days late. After this period, the work will be counted as a non- submission. 代写计算机编程作业

Complete your assignment from here (heading styles have been set up to assist you in this work) (Delete the instructions in this font before you save and submit your work):

MODULE TITLE

Table of Contents

1 Heading 1 – Suggested that you use this for each Question answered …………………………………….9

1.1 Heading 2 – suggested that you use this for each sub-heading in each question answered ………9

1.1.1 Heading 3 – you may use this heading as appropriate …………………………………………………….9

Enter a page break here and between each question 代写计算机编程作业

8 Heading 1 – Suggested that you use this for each Question answered

8.1 Heading 2 – suggested that you use this for each sub-heading in each question answered

8.1.1 Heading 3 – you may use this heading as appropriate

 

更多代写:澳洲心理学网课代修  槍手代考  北美quiz代考价格  北美教育学report代写  毕业论文选题代写  如何写essay

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

代写计算机编程作业
代写计算机编程作业

发表回复