i need help in c++

i need help in c++

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

11/15/2013,2:10 PMCMPT 111/116 (13/14WT1): Assignment 7 Description

Page 1 of 6https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

Home My Courses My Forums My Profile
Home ▶ My courses ▶ CMPT ▶ CMPT 111/116 (13/14WT1) ▶ Assignments & CodeLab ▶ Assignment 7 Description

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

CMPT 111/116 – Introduction to Computer Science and Programming

You are logged in as Ghazi Al Hilal (Logout)

Assignment 7 Description
Lab session: Week of Nov 4 – Nov. 15
Due date: Nov 18th, 2013, 10:00 pm
Total marks: 35
Notes:

This assignment is individual work. You may discuss the questions and problems
with anyone, but the work you hand in for this assignment should be your own work.
Each question indicates what to hand in. Usually, it will be a single document for
each question. You must give your document the name we prescribe for each
question. You should make sure your name and student number appear at the top of
every document you hand in. These conventions assist the markers in their work.
Failure to follow these conventions will result in needless effort by the markers, and a
deduction of grades for you. Do not submit folders, zip files, even if you think it will
help.

Hand in your work using Moodle. This page here shows you how to do this.
Moodle will not allow you to submit work after the due date. It is advisable to
hand in each answer that you are happy with, as you go. You can always revise and
resubmit as many times as you like before the deadline.
Questions are annotated use descriptors like “easy” “moderate” and “tricky”. All
students should obtain perfect grades on “easy” problems. Most students should
obtain perfect grades on “moderate” problems. The problems marked “tricky” may
require significantly more time, and only the top students should expect to get perfect
grades on these. We use these annotations to help students be aware of the
differences, and also to help students allocate their time wisely.
This assignment will require you to write C++ code using the Eclipse software. The
main page has several short videos on using Eclipse. Your lab TA will be able to help
you learn to use it productively.
When you hand in your C++ programs, hand in the .cpp file only, not the whole
project. To find your .cpp files that you create as part of your projects, open up
Explorer/Finder/Dolphin and navigate to the folder/directory that you selected as
your ‘workspace.’ Within that folder you’ll see folders for each of the projects
that you created. Navigate into the appropriate one, and then into the “src”
folder; you’ll see your .cpp file there.

Your assignment should consist of a total of 8 files uploaded to the course Moodle.

Question 1 (5 marks)
Introduction
Computer vision is a subfield of computer science that explores algorithms for interpreting
visual information such as images from cameras, such as trying to automatically recognize
certain kinds of objects. A common task is to measure the amount of overlap between
shapes represented by two images. For example, suppose we have two images containing
leaf-like shapes:

Navigation

Home

Site pages
My profile
Current course

CMPT 111/116 (13/14WT1)
Participants
Badges
General
Midterm 2 Information
Course Resources
Week 10 – November
12 to November 15
Week 9 – November 4 –
November 8
Week 8 – Oct 28th to
Nov 1st
Week 7 – Oct. 21st to
Oct. 25th
Week 6 – Oct. 15th to
Oct. 18th
Week 5 – Oct. 7th to
Oct. 10th
Week 4 – Sept. 30th to
Oct. 4th
Week 3: Sept 23 – Sept
27
Week 2: Sept 16-20
Week 1: Sept 9-13
Week 0: Sept 5-6
Assignments &
CodeLab

My home

Assignment 1
Discussion
Hand in Assignment
1
Assignment 1
Description
Assignment 1
Solution and
Marking Scheme
Lab #1
Assignment 2
Discussion
Hand in Assignment
2
Assignment 2
Description
Assignment 2
Solution and
Marking Scheme
Assignment 3
Discussion
Hand in Assignment
3
Assignment 3
Description

Administration

Course administration

My profile settings

http://moodle.cs.usask.ca/moodle

http://moodle.cs.usask.ca/moodle/my

http://moodle.cs.usask.ca/moodle/mod/hsuforum/allforum.php

http://moodle.cs.usask.ca/moodle/user/profile.php

https://moodle.cs.usask.ca/moodle/

https://moodle.cs.usask.ca/moodle/my/

https://moodle.cs.usask.ca/moodle/course/index.php?categoryid=2

https://moodle.cs.usask.ca/moodle/course/view.php?id=18

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

https://moodle.cs.usask.ca/moodle/user/profile.php?id=501

https://moodle.cs.usask.ca/moodle/login/logout.php?sesskey=wN0hC46GoY

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=572

https://moodle.cs.usask.ca/moodle/

https://moodle.cs.usask.ca/moodle/course/view.php?id=18

https://moodle.cs.usask.ca/moodle/user/index.php?id=18

https://moodle.cs.usask.ca/moodle/my/

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=526

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=527

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=531

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=753

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=571

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=727

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=698

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=702

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=794

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=752

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=751

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=722

11/15/2013, 2:10 PMCMPT 111/116 (13/14WT1): Assignment 7 Description

Page 2 of 6https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

To a human being (and to many other animals), the similarity in these images is obvious, but
you might not be sure about how to give an objective measure of how similar they are. You
may be surprised to learn that the question of similarity in these images can be answered by
applying the basic computer science we’ve been studying.

The contents of these images can be represented by two-dimensional boolean arrays in C++
(one array for each image). They are called binary images because each pixel can have
only one of two intensity values (black and white, or true and false, or 0 and 1). The width
and height of the arrays would be the same as the width and height of the images in pixels,
and an element of the array at offset [y][x] would be true if the pixel at coordinate (x,y) in the
image was white, and false otherwise (i.e., if it is black). Note that we have to write the
offsets as [y][x] and not [x][y] because the first offset of a 2D array indexes a row and
therefore corresponds to the y-coordinate of a pixel.

Let’s call the white region in the left hand image shape A, and the white region in the right
hand image shape B. We want to compute a very simple measure of overlap between these
two white shape regions (i.e., we don’t count a black pixel as part of a shape). That
measure is defined as: 2 * (number of pixels that A and B have in common ) / (number of
pixels in shape A + number of pixels in shape B).

(This measure has a name: the Dice Similarity Coefficient (DSC). It was originally used by
Dice, who was an ecologist, for measuring similarities in biological populations, though
expressed in a slightly different form suitable for that task.)

Note that when the shapes do not overlap at all, the number of pixels that A and B have in
common will be 0, and the DSC will also be zero; when the regions match perfectly, the
number of pixels common to A and B will be equal to the number of pixels in A and the
number of pixels in B, and the DSC will have a value of 1. For all other situations the value of
DSC will be between 0 and 1.

Your task is to compute the Dice Similarity Coefficient for two given images containing a
shape region. To keep things simple, and do-able, we will restrict our images (arrays) to
having a width of exactly 5 pixels, but the height may be anything.

Your Tasks
1. Write a function with three parameters: two 2D boolean arrays (which must be the

same size) and an integer that indicates the height of the arrays (remember: the width
is fixed at 5!). You must decide on an appropriate return type for the function. The
function should interpret the two array parameters as shape images (as above) and
return the Dice Similarity Coefficient for them.

2. Test your function with four different pairs of images (2D boolean arrays). At least one
of your tests should compute the similarity between two identical images (the result
should be a DSC of 1) and one pair of images must be a different height from the
others . Use small images/arrays for your tests, with heights no greater than 10. You
can hard-code your test arrays, that is, declare and initialize them to the desired input
image at the same time, as in Chapter 14.2 of the textbook. For each test, print out
the two images being tested (see sample output, below; use 0 to represent ‘false’ and
‘1’ to represent true), and the computed Dice Similarity Coefficient.

Sample Output (for a single test):

0 0 1 0 0

0 1 1 1 0

1 1 1 1 1

0 1 1 1 0
0 0 1 0 0
0 0 1 0 0
0 1 1 1 0
0 0 1 0 0
0 1 1 1 0
0 0 1 0 0

DSC is: 0.818182

Purpose: To practice declaring, and using information in 2D arrays.

What to Hand In:

1. Your program in a text file called a7q1.cpp.
2. Copy the console output of your program from your tests and submit them in a file

called a7q1_testing.txt (.rtf and are also okay).

Be sure to include your name, NSID, student number, lecture section and tutorial
section at the top of all files.

Degree of difficulty: Easy

Evaluation:

0/5: Nothing submitted or files cannot be opened.
1 mark: name, NSID, student number, lecture section, tutorial section at the top of all

My courses

Assignment 3
Solution and
Marking Scheme
Assignment 4
Discussion
Hand in Assignment
4
Assignment 4
Description
Assignment 4
Solution and
Marking Scheme
Assignment 5
Discussion
Hand in Assignment
5
Assignment 5
Description
Assignment 5
Solution and
Marking Scheme
Assignment 6
Discussion
Hand in Assignment
6
Assignment 6
Description
Assignment 6
Solution and
Marking Scheme
Assignment 7
Discussion
Hand in Assignment
7
Assignment 7
Description

https://moodle.cs.usask.ca/moodle/my/

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=870

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=799

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=798

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=795

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=871

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=1049

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=1051

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=869

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1052

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=1398

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=1399

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1349

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1434

https://moodle.cs.usask.ca/moodle/mod/hsuforum/view.php?id=1445

https://moodle.cs.usask.ca/moodle/mod/assign/view.php?id=1446

https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

11/15/2013, 2:10 PMCMPT 111/116 (13/14WT1): Assignment 7 Description

Page 3 of 6https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

files.
4 marks: correct Dice Similarity Coefficients calculated, established by the four tests: 1
mark per correct test.

Question 2 (5 marks)
In this question we will work again with 2D arrays that represent an image. But this time,
some of the images will be grayscale images. In a grayscale image, each pixel is
represented by a floating point value between 0.0 and 1.0 where 0.0 represents black, 1.0
represents white, and values in between represent intermediate shades of gray from dark to
bright.

A very common operation in image processing is to separate bright objects from a dark
background using an operation called thresholding. Thresholding essentially converts a
greyscale image into a binary image (the kind we used in the previous question). The way it
works is this:

A user chooses a single value between 0 and 1, called the intensity, t.
The program looks at every pixel in the grayscale image (call it I), and sets the pixel
value in a (new) binary image (call it J)
If a pixel value in I is less than or equal to t, the corresponding pixel in J is set to ‘false’
(0, black).
Likewise, if a pixel value in I is greater than t, the corresponding pixel in J is set to
‘true’ (1, white).

Again, in this question we will assume that images are always exactly 5 pixels wide, but may
be of any height.

Your Tasks
1. Write a procedure that takes the following parameters: I, a 2D float array representing

a grayscale image, as defined above; J, a 2D boolean array representing a binary
image, as defined in Question 1; a threshold t between 0.0 and 1.0, and the height of I
and J. This procedure will threshold the image I and store the resulting binary image
in J. Note that J is not an input to the function, it is actually an output, that is, it is an
array to hold the result.

2. Test the procedure you wrote in task 1 three times using a single image but a different
threshold t for each test. You may hard-code the input image used for your tests as in
Question 1. Use a small image array for your tests, with height no greater than 10.
For each test, print out the input image, followed by the output image, followed by
the threshold value t that was used (see sample output, below).

To make it easier to produce readable output, at the top of your program,
add the line #include (put on the line immediately after #include
) and then at the start of your main program, before any of your
tests, add the line: cout << setprecision(2) << fixed; . This will cause floating point numbers to print out to with exactly two digits of precision at all times and ensure nice alignment of your output numbers.

Sample Output (for a single test):

0.00 0.25 0.50 0.25 0.00

0.20 0.40 0.60 0.80 1.00

0.25 0.50 1.00 0.50 0.25

0.20 0.40 0.60 0.80 1.00
0.00 0.25 0.50 0.25 0.00

0 0 1 0 0

0 0 1 1 1

0 1 1 1 0

0 0 1 1 1
0 0 1 0 0

Threshold was: 0.40

Purpose: To practice declaring, reading and modifying 2D arrays.

What to hand in:

1. Your program in a text file called a7q2.cpp.
2. Copy the console output of your program from your tests and submit them in a file

called a7q2_testing.txt (.rtf and are also okay).

Be sure to include your name, NSID, student number, lecture section and tutorial
section at the top of all files.

Degree of difficulty: Easy

Evaluation:

0/5: Nothing submitted or files cannot be opened.
1 mark: name, NSID, student number, lecture section, tutorial section at the top of all
files.
4 marks: for calculating the correct images based on your input image

11/15/2013, 2:10 PMCMPT 111/116 (13/14WT1): Assignment 7 Description

Page 4 of 6https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

Question 3 (10 marks)
Continuing the theme of this assignment, in image processing and computer vision we often
want to create a compact description of an image. Such a description usually takes the form
of a few numbers computed from the image that would be somehow representative of the
image’s contents. Such a description could then be used to make a decision about the type of
image contents. A very simple description of a grayscale image might consist of:

the average graylevel over all pixels,
the largest graylevel in the image,
the number of pixels with graylevel >= 0.5,
a value indicating whether or not there are more pixels with a graylevel >= 0.5 than
there are with a graylevel < 0.5.

Your Tasks
1. In C++ define a record type suitable for storing the four pieces of information for the

image description given above.
2. Write a function which, given a record containing the image description, prints it out in

a user-friendly way (see sample output, below).
3. Write a function which, given an input image (using grayscale images as defined in

Question 2 with a fixed width of 5 pixels), computes the description of the image
described above, and stores it in a record using the record type you defined in task 1.
The return type of this function must be the record you defined in task 1.

4. Test the function you wrote in task 2 three times using three different images. You
may hard-code the input images used for your tests as in Question 1. As in previous
questions, use small images with a height no greater than 10. For each test, print out
the input image and the resulting image description using the function you wrote for
task 2 (see the sample output, below). Use the instructions in task 2 of Question 2 to
ensure that floating point numbers print with exactly 2 digits of precision.

Sample Output (for a single test):
0.00 0.25 0.50 0.25 0.00
0.20 0.40 0.60 0.80 1.00
0.25 0.50 1.00 0.50 0.25
0.20 0.40 0.60 0.80 1.00
0.00 0.25 0.50 0.25 0.00

Average graylevel: 0.42

Max graylevel: 1.00

Number of bright pixels: 11

Image has more bright pixels: no

Purpose: To practice declaring record types, and manipulating records; to demonstrate that
records are a way of returning multiple values from a function.

What to hand in:

1. Your program in a text file called a7q3.cpp.
2. Copy the console output of your program from your tests and submit them in a file

called a7q3_testing.txt (.rtf and are also okay).

Be sure to include your name, NSID, student number, lecture section and tutorial
section at the top of all files.

Degree of difficulty: Moderate

Evaluation:

0/10: Nothing submitted or files cannot be opened.
1 mark: name, NSID, student number, lecture section, tutorial section at the top of all
files.
3 marks: record type definition is appropriate
2 marks: correctness of the function for printing the image description
4 marks: correctness of the function for computing the description

Question 4 (15 Marks)
The theme of this assignment has been interrupted by the zombie apocalypse, and
the walking dead are attacking! You have been recruited by the National Zombie Defence
Corps to build a simulation engine, and then run some simulations to determine what level of
defences would be needed to repel a zombie attack on a human stronghold.

Your battlefield simulation will be represented by a grid representing square regions of land.
This grid will be a fixed size with 10 columns and 15 rows (each cell represents a square of
land). The bottom row of cells represents the land nearest the stronghold, and the top row of
cells represents the land farthest away that the defenses can still reach. When zombies start
attacking, the zombies appear the cells of the top row of the grid. Since zombies are single
minded (and kind of dumb) they always move in a straight line, downwards, towards the
human stronghold, which is just below the bottom row of the grid. Along the way, some
zombies will be repelled (okay, destroyed) by fortifications, and not all zombies will reach the
stronghold. The (simulated) time it takes for the (simulated) zombies to reach the stronghold
depends on the (simulated) features of the land.

(Of course, if any zombies reach the stronghold, all hope is lost. But since this is a

11/15/2013, 2:10 PMCMPT 111/116 (13/14WT1): Assignment 7 Description

Page 5 of 6https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

simulation, we only simulate the despair for a second, and try another run with better
defenses.)

In the simulation, you will need to keep track of four pieces of information for each grid
square. :

The number of zombies repelled (destroyed) by defenses in the square. This number
reflects the strength of the the fortifications, e.g., walls, bombs, traps, etc.. As we will
describe below, we will determine this for each square before we start the simulated
invasion. We can use this information to determine how many zombies survive to
move to the next square.
The amount of time, in seconds, it takes for zombies to traverse the grid square. This
represents the fact that the terrain in each grid square may be different, and may be
easier or harder for the zombies to cross. As we will describe below, we will
determine this for each square before we start the simulated invasion. We can use
this information to determine when the surviving zombies reach the next square.
The number of attacking zombies that entered the square. This is the number of
zombies that enter the grid square from the previous row (or appear as part of the
initial attack, in the case of the top row). As we will describe below, we
will determine this for only the top row before we start the simulated invasion. The
simulation will calculate this information for the remaining rows.
The arrival time of zombies (if any) entering the square, in (simulated) seconds since
the beginning of the simulation. For grid squares in the top row, this is 0.0
seconds. The simulation will calculate this information for the remaining rows.

At the beginning of the attack, you will know all four pieces of information for the top row of
the grid, but only the first two pieces of information for the rest of the grid. The top-left corner
of the grid is (0,0). Grid coordinates increase as one moves right and down, respectively.

For a given grid square with coordinates (x,y), the number of attacking zombies is equal to
the number of zombies that attacked grid square (x, y-1) minus the number of zombies that
the fortifications in grid square (x,y-1) repelled. If the result of the subtraction is 0 or less,
then no zombies attack this grid square. This is represented by setting a value of zero for the
number of attacking zombies (even if the result is negative).

The arrival time of zombies at grid square (x,y) is the arrival time of the zombies at grid
square (x,y-1) plus the time to traverse grid square (x, y-1). If no zombies make it to a grid
square, this is represented by a negative value for the arrival time. The strength of the
fortifications and the traversal time for each grid square will be random numbers (subject to
some constraints — see below).

At the end of the simulation you are to report three results of the simulation:

The percentage of the total number of attacking zombies that were repelled by the
fortifications.
The number of zombies that got through the fortifications and attacked the stronghold.
If any zombies reached the stronghold, report the average amount of time it took those
zombies to do so.

Your Tasks
1. Define a record type (C++ struct) called GridSquare that is suitable for storing the

information for a single grid square.
2. Define a record type (C++ struct) called SimulationResults that is suitable for storing

the results of the simulation.
3. Write a function battlefieldSimulation for running the simulation. This function will

have the following header:
SimulationResults battlefieldSimulation(GridSquare
battleGrid[15][10], int initialZombies, int maxFortification)
The first parameter is the 10 x 15 grid described above. The second parameter is the
number of zombies that appear in each grid square of the top row of the grid at the
beginning of the zombie attack. The third parameter is the largest number of zombies
that can be repelled by the fortifications in a SINGLE given grid square. Write this
function so that it implements the following algorithm:

1. (initialization) For each grid square:

set the number of zombies repelled by the fortifications to a random
number between 0 and maxFortification. If you can’t remember how to
do this, refer back to Assignment 6, question 2.
set the time to traverse the grid square to a random number between 5
and 10 seconds:

Generate a random integer between 0 and 1000.
Divide it by 1000.0 to get a value between 0.0 and 1.0.
Multiply this by 5.0 to get a value between 0 and 5.0.
Add 5.0 to this to obtain a number between 5.0 and 10.0.

initialize the zombie arrival time to 0.0s.

2. (initialization) For each grid square in the top grid row, set the number of
attacking zombies to initialZombies.

3. (simulation) For each row, starting with the second row

For each grid square in the current row, compute the number of attacking
zombies, and their arrival time, as described above. Remember: if the
number of attacking zombies as computed by the above formula is 0 or

11/15/2013, 2:10 PMCMPT 111/116 (13/14WT1): Assignment 7 Description

Page 6 of 6https://moodle.cs.usask.ca/moodle/mod/page/view.php?id=1425

You are logged in as Ghazi Al Hilal (Logout)

less, no zombies attack the grid square, so set the arrival time to a
negative number and the number of attacking zombies to zero.

4. (analysis) Using values in the bottom grid row, compute and store in a
SimulationResults record:

the percentage of the original attacking zombies that were repelled by
the fortifications;
the number of zombies that were not repelled and attacked the
stronghold; and
for those zombies that reached the stronghold, the average amount of
time it took them to do so.

4. Write the main() function — it should do the following, in order:

Seed the random number generator using srand(time(NULL));. Since you’re
using random number functions and the time() function, make sure
you #include and #include to make them available.
Declare and initialize variables needed to call the battlefieldSimulation
function. Remember that you don’t need to initialize the argument to
the battleGrid parameter because the battlefieldSimulation function will do
that (pass by reference!).
Run the simulation with initialZombies = 100 and maxFortification = 10 by
calling your battlefieldSimulation function.
Print the results of the simulation to the console in a user-friendly manner.

5. Run your program at least 5 times and copy and paste the results of each test run to a
text file a7q4_testing.txt. Because of the random numbers involved, it may be difficult
to tell whether you have the right answer. The following table shows statistics over
10000 runs with the above parameters:
Result Average Standard Deviation Min Max

Percentage repelled 74.9% 3.8% 61.4% 88.6%

Number that attack stronghold 250 38 114 386

Average arrival time 112.4s 1.8s 106.1s 119.1s

You should find that most of the time your results are near the average plus or minus
twice the standard deviations, but rarely could be as high as the max or as low as the
min (or even outside these ranges — this is unlikely but not impossible).

6. Run more tests to determine the smallest value of maxFortification that will
consistently repel at least 90% of the zombies (continue to use initialZombies = 100).
You don’t have to show any test runs for this, but report your findings at the end
of a7q4_testing.txt.

7. Run more tests to determine the smallest value of maxFortification that will
consistently repel 100% of the zombies (continue to use initialZombies = 100). You
don’t have to show any test runs for this but report your findings at the end
of a7q4_testing.txt.

Purpose: To practice working with “nested” data, in this case, a 2D array of records.

What to hand in:

1. Your program in a text file called a7q4.cpp.
2. Your a7q4_testing.txt (.rtf and are also okay) containing the results of your tests

from Task 5, and the values of maxFortification that you found for Tasks 6 and 7.

Be sure to include your name, NSID, student number, lecture section and tutorial
section at the top of all files.

Degree of difficulty: Moderate, tricky in places.

Evaluation:

0/15: Nothing submitted or files cannot be opened.
1 mark: name, NSID, student number, lecture section, tutorial section at the top of all
files.
3 marks: record definition for GridSquare is appropriate.
2 marks: record definition for SimulationResults is appropriate.
7 marks: battlefieldSimulation function produces correct output within statistical
expectations.
2 marks: find the values of maxFortification that consistently repel 90% and 100% of
zombies, respectively.

Last modified: Wednesday, 13 November 2013, 11:54 AM

https://moodle.cs.usask.ca/moodle/user/profile.php?id=501

https://moodle.cs.usask.ca/moodle/login/logout.php?sesskey=wN0hC46GoY

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER