Codingassignmenthelper | Home Codingassignmenthelper | Samples

CO1401 Programming

CO1401

CO1401 Programming

		CO1401 CO1301Games Concepts11Programming: 2019-2020
Assignment: Puzzle

Release Date: 10/02/20


Introduction
This assignment is based on a word search puzzle: the sort of puzzle where you have a table of letters and you have to find the word in the table. Examples of this type of puzzle can be found at the following website: http://thewordsearch.com/.

This is an individual project and no group work is permitted.

Do not diverge from the assignment specification. If you do not conform to the assignment specification then you will lose marks.

You must use C++.

Learning Outcomes Assessed
· To develop the student’s software design skills
· To build on the student’s introductory programming skills to produce solutions to more complex problems.
· To introduce the student to advanced programming techniques in preparation for study of an advanced programming module.

Deliverables, Submission and Assessment
· You need to submit your source code and demonstrate your working program in the lab session.
· Submission is electronic, via eLearn (WebCT). 
o You must upload a text file.
o Upload the code you have written in a single file. (For this assignment, even if you know how, you are not permitted to have multiple source files.)
o The easiest way to do this is to rename your source code file. The source code is in a file in your project folder. It has a .cpp extension. Simply change the extension to .txt and then upload the file to Blackboard.
· Assessment will be by demonstration in your usual lab session during the week immediately after the electronic submission (i.e. the week beginning 23/03/20).

Demonstration
· You must demonstrate your program to your practical tutor.
· You must also show your code to your tutor.
· You will be asked questions about your code. Be prepared to answer them. You may be asked to explain what is happening, or to describe what a line of code does. If you cannot answer satisfactorily then you will be asked to attend an interview with the module tutor.

Resources
· This assignment has an associated set of text files. The files can be found inside the assignment folder Web-CT.

Assignment Requirements

Basic Requirements to get 45%
· The code that you submit must compile without errors.
· Use "text1.txt" as your puzzle file.
· The list of search words is in "search1.txt".
· Read in the text file "text1.txt". You must read the characters into an array.
· Read in the text file "search1.txt" You must read the characters into an array.
· Do a comparison between the words from "search1.txt" and the words from "text1.txt". You need to find the occurrence of each word from “search1.txt” in the string of characters from “text1.txt”. Not all of the words occur in “text1.txt”.
· For the 45% grade you can use the string pattern matching methods in the libraries, e.g. the substr and find methods of string.
· Output the word, whether it has been found and, if found, the index of its location in the array, e.g.
"dog", Found, location 1
"pig", Found, location 10
"cat", Found, location 5
"rat", Not Found
"cow", Not Found
	

Lower second classification to get 55%
· You must complete the criteria from the lower band.
· The big difference from the lower band is that you must write your own string pattern matching method. You cannot use ones from the libraries.
· Complete the same tasks as in the lower band.
· You must read the text files character by character.
· You must write your own pattern matching method. You cannot use any of the STL string pattern matching methods. You cannot use any of the old style “stdio.h” string pattern matching functions.
· Hint: your pattern matching method needs to take into account the ends of the array – be careful about going out of bounds!

· The other additional elements for this grade concern code style and layout:
· Use functions/methods to separate your code into sensible, reusable parts. Comment these functions appropriately.
· Your code must be properly indented and laid out so that it is readable.
o Brackets must line up (and should normally be on a line of their own).
o Indentation must be consistent.
o Appropriate use of white space should be made.
o Over-long lines of code or comments should be split up
· You should have no "magic numbers" but instead make proper use of constants.
· Variable names should be meaningful.
· Your code should be commented appropriately.
· You should make proper use of arrays, with loops to process them.

Upper second classification to get 65%
· You must complete the criteria from the lower bands.
· This classification changes the input file but also changes the puzzle into a 2D puzzle.
· Read the words from the input file: "text2D.txt".
· Read the words into a 2D array, size 4x14.
· You still need to write the filtered text to file. Each output file is named after the input file, e.g. the filtered text from "text1.txt" is written to "text1Filtered.txt", whilst "text2.txt" is written to "text2DFiltered.txt".
· Replace the characters of found words by full stops, e.g. when you find the word “cat” replace it "…" (3 full stops).
· You must write the table as 2D character grid in the output file.
· Words may now be written backwards as well as forwards, e.g. hidden in the text is the word “rat” but it is written backwards “tar”.
· When you output the information about the words to screen, output the line number of word, as well as the index of its location in the array, e.g.
"dog", Found, line, location 1
"pig", Found, line 1, location 10
"rat", Found, line 2, location 11
					(Not a complete list)
		

First classification to get 75%
· You must complete the criteria from the lower bands.
· There is an extended list of search words in "search2D.txt".
· Note that some of the words now overlap. This will make it more difficult to replace the characters of found words.



· Words must now be found vertically in the table, as well as horizontally.  Words may be written backwards and forwards, but also up and down.
· Remember to replace the characters of found words by full stops, e.g. when you find the word “cat” replace it "…" (3 full stops).
· Remember to write the table to the output file.



Mid First classification to get 85%
· You must complete the criteria from the lower bands.
· Words must now be found diagonally in the table, as well as horizontally.  Words may be written backwards and forwards, but also up and down.
· In order to make the diagonals more straightforward, diagonal words only occur downwards, but they can be on a diagonal down to the left or on a diagonal down to the right.



High First classification to get 98%
· You must complete the criteria from the lower bands.
· Orthogonal means "right-angled." In this context horizontal and vertical in the table as compared to diagonal.
· Words must now be found in any orthogonal sequence of letters in the table. The sequence will only ever be 3 characters long. Orthogonal words only occur downwards. However they may occur downwards with one step to the left, or downwards with one step to the right.
· Hint: only a limited number of orthogonal patterns therefore exist. It is possible to pregenerate the patterns and then use these to search, rather than attempt to calculate the search paths.




Hand In Details
· The hand-in deadline is Sunday 22/03/20, Midnight
· Submissions should be made via the link on the module Blackboard page
· Submissions are automatically checked for plagiarism by TurnItIn
· Ensure your name and student ID is stated at the top of your code.
· You may only submit one file:
o Submit the .cpp file from the project folder. This file should contain all your code for the assignment. I should be able to copy code from this file and run it.
o Ensure that your code just runs without the need to modify it.
· You will demonstrate the code in your normal lab in the week of the assignment deadline, i.e. i.e. the week beginning 23/03/20.

The same rules of lateness apply to the demonstration as to handing in your work. If you do not turn up to demonstration then your assignment will be treated as late.

Regulations

The coursework regulations can be found in the University regulations.

CO1401
Assignment
Gareth Bellaby
Page 1


		
To Download Click Here > CO1401 Programming.pdf
Codingassignmenthelper | Home Codingassignmenthelper | Home