澳洲論文代寫 > assignment代寫 > IT assignment > > 正文

IT assignment

C#程序代寫 visual studio 2012代寫 IT代寫

Assignment 1 – Spring 2013 Page 1 of 10
Faculty of Engineering and
Information Technology
School of Software
31927 - Applications Development with .NET
32998 - .NET Applications Development
SPRING 2013
ASSIGNMENT 1
DUE DATE – 11th September 2013
FINAL DUE DATE – 18th September 2013
This assignment is worth 25% of the total marks for this subject.
BACKGROUND
In the various series of Star Trek we see many star ship battles amongst the assorted galactic
powers. These include
• The United Federation of Planets
Constitutional Federation. Earth is one of its founding members.
• The Klingon Empire
Feudal Monarchy. Warrior culture similar to Japanese samurai.
• The Romulan Star Empire
Roman style Republic. Devious, manipulative and treacherous.
• The Cardassian Union.
Orwellian, military dictatorship. Aggressive and ruthless.
• The Breen Confederacy
Mysterious, reclusive and somewhat piratical.
• The Dominion
Absolute dictatorship requiring total devotion to the Founders.
• The Borg Collective
Cybernetically connected hive mind. Enormously powerful enemies that assimilate
entire worlds.
The Federation, Klingons, Romulans, Cardassians and the Breen are clustered together
around the border of the Alpha and Beta Quadrant of the galaxy. The Federation is the
largest of these occupying a volume of space nearly 8000 light years across and including
over 150 species. They are dwarfed by the Dominion in the Gamma Quadrant and the even
larger Borg presence in the Delta Quadrant.
While there have been a number of conflicts between the various Alpha/Beta Quadrant
powers they pale into insignificance compared to the devastating Dominion War. This
occurred when the Dominion attempted to spread its influence into the Alpha quadrant by
first allying themselves with the Cardassians and later the Breen. This forced an uneasy
alliance between the Federation, Klingons and the Romulans. Most of the encounters were
small skirmishes involving less than a dozen ships but some ranged up in size to a few titanic
battles with more than a thousand ships per side.
Assignment 1 – Spring 2013 Page 2 of 10
The Dominion War is now over but all the Alpha/Beta Quadrant powers still dread the next
incursion by a Borg Cube.
THE ASSIGNMENT
In this assignment you will be simulating some of these battles to see what happens.
STAR SHIPS
Four factors are needed to describe the combat capability of a particular star ship.
Shield Strength
(S)
• Shields are generated by the ship to defend against the weapons of
an attacker.
• The value attached to the ship is the maximum strength the shield
can attain.
• Weapon fire will drain the shield of power.
• Shield strength cannot be reduced to below zero.
Regeneration
Rate (R)
• Every round of battle a ship is not hit it will repair any damage done
to the shield by this amount.
• It cannot increase shield strength to beyond ship maximum.
• For example, the ship’s maximum shield strength is 100 but has been
reduced to 33 in battle. Its regeneration rate is 2. It is not hit that
round so it increases its shield strength to 35.
Hull Strength (H)
• How much physical damage the ship can sustain is due to the size of
the ship, the strength of the Structural Integrity Field that reinforces
its hull plus any ablative armour it is covered in.
• Damage done to the hull cannot be regenerated during battle.
• When hull strength has been reduced to <= 0 the ship has been
destroyed.
Weapons (W)
• This is the amount of damage a ship will inflict on another ship any
time it hits it.
• The damage comes in two parts. The base part (B) and the random
part (R).
• Damage = B + rand.Next(R);
• You can read about how to use the .NET random number generator
below.
• This damage will be subtracted from the shield strength till it
reaches zero. Any surplus damage will be subtracted from the hull.
• For example, the ship’s remaining shield strength is 7 and hull
strength 20. It is hit with a weapon that does 11 points of damage.
The ship’s shield has been reduced to 0 and hull reduced by 4 to 16.
STARTING THE PROGRAM
Your program must use command line parameters. Assuming your program has been
compiled to TrekBattle.exe you would run it in the following manner.
>TrekBattle seed fleet1.txt fleet2.txt
seed
This is an integer with a value >= 0. You will use it to initialise the .NET random number
generator thusly
Random rand = new Randon(seed);
Assignment 1 – Spring 2013 Page 3 of 10
To use the generator you will call it thusly
int randNum = rand.Next(numSize);
This will put a random number in the range 0 to numSize-1 into randNum. You will only use
the one random number generator for all random numbers you need to create. Do not
create multiple instances of the random number generator.
fleet1.txt and fleet2.txt
These are the names of two text files that contain fleet information. They can be any name
you like. Each file will be in the following format.
• The first line will contain the name of the fleet. This is a string.
• The second line will contain the number of ships in the fleet. An integer >= 1.
• Each ship will be listed after that. Ships are defined by 6 pieces of information, each
on a separate line
1. Ship Class name. A string.
2. Shield Strength. An integer >= 1.
3. Regeneration Rate. An integer >= 1 and <= Shield Strength.
4. Hull Strength. An integer >= 1.
5. Weapon Base Damage. An integer >= 1.
6. Weapon Random Damage. An integer >= 1.
• There are no blank lines in the file except after the last ship has been listed.
For example
Federation
2
Akira
100
2
20
8
7
Sovereign
200
4
20
15
7
would be a Federation fleet of 2 ships - an Akira and a Sovereign class.
RUNNING THE BATTLE
Each round of battle is broken into four parts.
1. Each ship in Fleet 1 will randomly select a ship in Fleet 2 and fire its weapons at it.
2. Each ship in Fleet 2 will randomly select a ship in Fleet 1 and fire its weapons at it. If
the ship had been theoretically destroyed in the first part it will still be able to fire its
weapons.
3. Any ship in either fleet that has been destroyed will be removed from the fleet. Any
ship that was not hit will regenerate its shields.
4. Keep track of the number of rounds played.
At the end of each round, a new round will be started.
Assignment 1 – Spring 2013 Page 4 of 10
Order of ship fire
Surviving ships will fire in the order they were loaded. In the above example, the Akira would
fire first and then the Sovereign. They will then generate the damage they do.
Selecting a ship to fire on
The following example demonstrates how ships are to be selected for targeting.
Assume an enemy fleet loaded 4 ships, A, B, C and D in that order;
1. Generate a random number in the range 0 to 3. 0 for ship A, 1 for B, 2 for C and 3 for
D.
2. Later on, ship B has been destroyed. The list of ships is now A, C and D. You would
then generate a random value in the range 0 to 2. 0 for ship A, 1 for C and 2 for D.
3. Ship A has now been destroyed. The list of ships is now C and D. You would generate
a random value in the range 0 to 1. 0 for ship C and 1 for D.
4. Ship C has now been destroyed. The only possible ship to target is ship D.
After the ship is selected the damage generated will be applied to it.
ENDING THE BATTLE
The battle ends when one or both of the fleets have lost all their ships. It is quite possible for
two fleets to mutually destroy each other. If both fleets are destroyed it is a draw otherwise
the surviving fleet has won.
REPORTING THE BATTLE
1. At the end of each round a report is printed in the following format.
After round XX the Federation fleet has lost
Akira destroyed
Defiant destroyed
After round XX the Dominion fleet has lost
Attack Ship destroyed
Attack Ship destroyed
Battle Cruiser destroyed
XX = the round number, an integer >= 1.
Only print a ship destroyed if it was destroyed during that round. Don’t print anything
for a fleet if it didn’t lose a ship that round. Don’t print anything if neither side loses a
ship that round.
2. At the end of the battle, print a report of the result. If it is a draw then just report the
round number and that both fleets were destroyed. If one side has won, print a report in
the fashion shown below.
After round XX the Federation fleet won
12 enemy ships destroyed
7 ships lost
3 ships survived
Defiant – moderately damaged
Galaxy - lightly damaged
Deep Space 9 – heavily damaged
The level of damage is determined in the following way.
Percent Undamaged = (current hull strength) * 100 / (maximum hull strength)
Assignment 1 – Spring 2013 Page 5 of 10
Percent undamaged
Result
100
undamaged
90 – 99
lightly damaged
70 – 89
moderately damaged
40 – 69
heavily damaged
0 – 39
very heavily damaged
For example, if a ship had a starting hull strength of 15 and this has been reduced to 11
then Percent Undamaged = 11 * 100 / 15 = 1100 / 15 = 73 = moderately damaged.
EXAMPLE SHIPS
The following tables give a list of the main 24th Century Star Trek ships classes and their
combat capability.
Star Trek fans take note. Please don’t start an argument about what you think they should
be. Any debates about this on the UTS Online discussion board will be immediately deleted.
FEDERATION
Class
S
R
H
W
Class
S
R
H
W
Defiant
60
3
20
7,3
Akira
90
2
20
8,7
Intrepid
50
1
8
6,3
Galaxy
100
2
15
8,5
Excelsior
70
1
9
6,5
Sovereign
200
4
20
15,7
Nebula
80
1
12
7,5
Deep Space 9*
5000
7
80
45,11
*A space station rather than a star ship but a lot of action happens there and it is attacked a number of times
KLINGON
Class
S
R
H
W
Class
S
R
H
W
Bird of Prey
60
1
10
6,3
Negh’var
170
3
30
13,5
Vor’cha
90
1
20
7,5
ROMULAN
Class
S
R
H
W
Class
S
R
H
W
D’deridex
100
2
19
8,3
Norexan*
130
2
15
13,5
*Also known as Valdore. Came into service after the Dominion War
CARDASSIAN
Class
S
R
H
W
Class
S
R
H
W
Galor
80
1
7
8,3
Keldon
90
1
8
11,5
BREEN
Class
S
R
H
W
Class
S
R
H
W
Frigate
60
1
8
5,5
DOMINION
Class
S
R
H
W
Class
S
R
H
W
Attack Ship
50
1
8
6,3
Battleship*
400
2
25
14,7
Battle Cruiser
90
2
25
13,5
Dreadnought**
2000
5
40
35,9
*Valiant – Season 6 DS9 **What You Leave Behind, Part 1 – Season 7 DS9
Assignment 1 – Spring 2013 Page 6 of 10
BORG
Class
S
R
H
W
Class
S
R
H
W
Sphere
3000
8
60
25,9
Cube
12000
15
150
83,15
BENCHMARK PROGRAM
In order to clarify how the program works I have placed an executable version of it on
SUBNET. Your implementation should work in exactly the same manner.
PLEASE NOTE. When you run the benchmark it says my name. Do NOT include that. Include
yours if you want. If your program includes my name then it will be assumed you are trying
to use the benchmark in the lab demonstration. See assessment below.
By the way, for those of you knowledgeable about such things, the code is obfuscated. So it’s
not worth trying to decompile with programs like .NET Reflector or ILSpy.
ASSIGNMENT OBJECTIVES
The purpose of this assignment is to demonstrate competence in the following skills.
• Program design
• Array and string manipulation
• Command line arguments
• Creating methods in C#
• Creating classes in C#
These tasks reflect all the subject objectives.
The solution I have for this assignment takes about 400 lines of code, including white space
(blank lines), comments, code that VS generates, etc. As part of your subject workload
assessment, it is estimated this assignment will take 25 hours to complete.
QUERIES
If you have a question, please contact the subject coordinator as soon as possible.
Gordon Lingard
glingard@it.uts.edu.au
9514-7935
Room 04.559, Building 10
However, for frequently asked questions a FAQ file will be put up on SUBNET. Please check
this before emailing the coordinator with a question.
If serious problems are discovered the class will be informed via an announcement on
SUBNET. It is your responsibility to make sure you frequently check SUBNET.
PLEASE NOTE 1: If the answer to your questions can be found directly in any of the following
• subject outline
• assignment specification
• SUBNET FAQ
• UTS Online discussion board
You will be directed to these locations rather than given a direct answer.
Assignment 1 – Spring 2013 Page 7 of 10
PLEASE NOTE 2: Please do not send email in HTML format or with attachments. They will not
be read or opened. Only emails sent in plain text format will be read. Emails without subject
lines will be automatically deleted by the junk mail filters I have in place.
ASSIGNMENT ERRATA
It is quite possible that errors or ambiguities may be found in the assignment specification or
the benchmark. If so, updates will be placed on SUBNET and announcements made
regarding the amendment. It is your responsibility to keep up to date on such amendments
and ensure you are using the latest version of the Assignment Specification and Benchmark.
ASSIGNMENT SUBMISSION
You must upload a zip file of your entire C# solution to SUBNET. Uploading can be done from
the Submit Assign section of SUBNET. The URL for SUBNET is as follows.
https://learn.it.uts.edu.au/netapp
You should all have an account on SUBNET. If not, please check with your lab assistant
before emailing me. I will not accept submissions from any other source.
You may submit as many times as you like until the final due date. The final submission you
make is the one that will be marked.
PLEASE NOTE1: SUBNET will reject any submissions that do not meet certain minimum
criteria. The Submit Assign section on SUBNET lists these criteria.
PLEASE NOTE 2: SUBNET may have overload problems 2-3 days before the due date.
Additionally, undiscovered bugs in the static code checkers may delay submission. If you
wait until the last minute to submit then expect problems. SUBNET problems will never be
accepted as a valid excuse for a late submission.
ACCEPTABLE PRACTICE VS ACADEMIC MALPRACTICE
• Students should be aware that there is no group work within this subject. All work must
be individual. However, it is considered acceptable practice to adapt code examples
found in the lecture notes, labs and the text book for the assignment. Code adapted
from any other source, particularly the Internet and other student assignments, will be
considered academic malpractice. The point of the assignment is to demonstrate your
understanding of the subject material covered. It's not about being able to find solutions
on the Internet.
You should also note that assignment submissions will be checked using software that
detects similarities between students programs.
• Participants are reminded of the principles laid down in the “Statement of Good Practice
and Ethics in Informal Assessment” in the Faculty Handbook. Assignments in this subject
should be your own original work. Any collaboration with another participant should be
limited to those matters described in the “Acceptable Behaviour” section. Any
infringement by a participant will be considered a breach of discipline and will be dealt
with in accordance with the Rules and By-Laws the University. The Faculty penalty for
proven misconduct of this nature is zero marks for the subject. For more information,
see
http://wiki.it.uts.edu.au/start/Academic_Integrity
Assignment 1 – Spring 2013 Page 8 of 10
ASSESSMENT
Marks will be awarded out of 20 using the following scheme.
• Testing: Between 0 and 10 marks will be awarded from demonstrating your assignment
in the week 8 laboratory. To prepare yourself for the demonstration in the laboratory
please take note of the following pages in SUBNET.
o Demo Assign. Gives a full description of how the demonstration will be conducted.
In particular, pay attention to the Demonstration Checklist. Failure to have done all
the items in the checklist can lead to zero marks.
o Assign Testing. Gives detailed description of the things you need to test in order to
ensure your program is thoroughly tested before the demonstration.
PLEASE NOTE 1: It is your responsibility to thoroughly test your code to ensure it is
working correctly. That it conforms to every aspect of the specification, makes no false
assumptions and doesn’t generate any unhandled exceptions.
PLEASE NOTE 2: Your final submission to SUBNET is the one that is marked. It does not
matter if earlier submissions were working; they will be ignored. Download your
submission from SUBNET and test it thoroughly in your assigned lab.
• Design: Between 0 and 6 marks will be awarded on the quality of your code design and
the algorithms used. This includes splitting your code up into well designed classes and
methods, using enumerations where appropriate, etc.
• Style: Between 0 and 3 marks will be awarded on the presentation style of the program.
This includes proper indenting and white spacing, helpful comments and meaningful
class/method/property/field/enum names.
Your final assignment mark will be out of 20 and will be calculated as follows.
1. Add 4 to your design mark and 7 to your style mark. After this scaling, your test mark will
be in the range of 0 to 10, design in the range 4 to 10 and style in the range 7 to 10.
2. Let L = the lowest of the 3 marks.
Let S = the second lowest of the 3 marks.
Assignment Mark = 2 × ? × ?? 10
rounded to the nearest whole number
You can use the following table to work out the mark.
Assignment 1 – Spring 2013 Page 9 of 10
Second lowest mark
4
4.5
5
5.5
6
6.5
7
7.5
8
8.5
9
9.5
10
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.5
1
1
1
1
1
1
1
1
1
1
1
1
1
.5
1
1
1
1
1
2
2
2
2
2
2
2
2
2
1
1.5
2
2
2
2
2
2
3
3
3
3
3
3
3
1.5
2
3
3
3
3
3
3
3
3
4
4
4
4
4
2
2.5
3
3
4
4
4
4
4
4
4
5
5
5
5
2.5
3
4
4
4
4
5
5
5
5
5
6
6
6
6
3
3.5
4
5
5
5
5
6
6
6
6
6
7
7
7
3.5
4
5
5
6
6
6
6
7
7
7
7
8
8
8
4
4.5
-
6
6
7
7
7
8
8
8
8
9
9
9
4.5
5
-
-
7
7
8
8
8
9
9
9
9
10
10
5
5.5
-
-
-
8
9
9
9
10
10
10
10
11
11
5.5
6
-
-
-
-
9
10
10
10
11
11
11
12
12
6
6.5
-
-
-
-
-
10
11
11
12
12
12
13
13
6.5
7
-
-
-
-
-
-
12
12
13
13
13
14
14
7
7.5
-
-
-
-
-
-
-
13
13
14
14
15
15
7.5
8
-
-
-
-
-
-
-
-
14
15
15
16
16
8
8.5
-
-
-
-
-
-
-
-
-
16
16
17
17
8.5
9
-
-
-
-
-
-
-
-
-
-
17
18
18
9
9.5
-
-
-
-
-
-
-
-
-
-
-
19
19
9.5
10
-
-
-
-
-
-
-
-
-
-
-
-
20
10
4
4.5
5
5.5
6
6.5
7
7.5
8
8.5
9
9.5
10
Example 1. If you get 8.5/10 for the tests, 5/6 for the design and 0/3 for style then
1. After scaling, the marks become 8.5, 9 and 7.
2. The lowest mark is 7 and the second lowest is 8.5. From the table this will give an
assignment mark of 13/20
Example 2. If you get 1.5/10 for the tests, 3.5/6 for the design and 3/3 for style then
1. After scaling, the marks become 1.5, 7.5 and 10.
2. The lowest mark is 1.5 and the second lowest is 7.5. From the table this will give an
assignment mark of 3/20
The rationale behind this marking scheme is as follows.
1. No matter how well designed your program may be and how good the styling, if it
doesn’t work then it isn’t worth any marks.
2. No matter how well your program works, if the design is terrible then it’s only worth a
maximum of 8 out of 20 = 40%.
3. No matter how well your program works and how good the design, if the styling is
terrible then it’s only worth a maximum of 14 out of 20 = 70%.
LATE ASSIGNMENTS, EXTENSIONS AND SPECIAL CONSIDERATION
Assignments that are submitted after the Due Date will lose 1 mark for each day, or part
thereof, that the assignment is late. Assignments will not be accepted after the Final Due
Date.
PLEASE NOTE 1: SUBNET has been set to reject any submission attempts after the Final Due
Date
PLEASE NOTE 2: Regardless of how many times you have submitted your assignment, if your
final submission is after the due date it will be considered late and marks will deducted
accordingly.
An extension till the Final Due Date will be granted if there is a fully documented reason
which merits it. The documentation must be presented to the Subject Coordinator before
Assignment 1 – Spring 2013 Page 10 of 10
the assignment due date. Extensions to after the Final Due Date will not be granted under
any circumstance. If an extension is granted that means the assignment will be accepted up
to the extension date without penalty. If an extension is granted, SUBNET will show when
the extension has been granted till in the Assign Details section.
Students may apply for special consideration if they consider that illness or misadventure
has adversely affected their performance in the assignment.
RETURN OF ASSESSED ASSIGNMENT
It is expected that marks will be made available a week after the demonstration via SUBNET.
You will also be given a copy of the marking sheet showing a breakdown of the marks.
 

tag:
Copyright ? 2008-2018 assignment代寫

在線客服

售前咨詢
售后咨詢
微信號
Badgeniuscs
微信

在線客服

售前咨詢
售后咨詢
微信號
Badgeniuscs
微信
英国代写_数学代写_c++/c代写_留学生代写怎么查出来?