You are on page 1of 18

LEVEL/ LEFEL : 4

MODULE CODE/ COD Y MODIWL: ACCC4006


SOFTWARE DEVELOPMENT

ASSESSMENT TYPE/ MATH O ASESU: ASSIGNMENT


ASSESSMENT/COMPONENT/ ASESIAD/CYDRAN: 1 & 2

COMPONENT WEIGHTING/ PWYSAU’R CYDRAN: 100%

WORD COUNT / NIFER Y GEIRIAU: 4000 WORDS/O EIRIAU

SUBMISSION DETAILS/ MANYLION CYFLWYNO:

• Make sure that Your Name , Your Student Number, Your Module Title,
Assignment Title and Your Module Lecturer’s Name are clearly shown on the front
page of your assignment

• All assignments must be submitted electronically to Moodle.

• DO NOT put this form into Turnitin or it will match many similarities with other
students’ submissions.

1
School of Applied Computing ASSIGNMENT SPECIFICATION

Programme: BSc (Hons) Computer Networks

Assignment Title: Software Development

Hand Out Date: The 2nd Week of Term Submission deadline: Please refer to the
assessments schedule
published on Students’
Hall in Moodle and the
Assessment Board on
campus
Referencing: In the main body of your submission you must give credit to authors on whose research your work is based. Append to
your submission a reference list that indicates the books, articles, etc. that you have read or quoted in order to
complete this assignment (e.g. for books: surname of author and initials, year of publication, title of book, edition,
publisher: place of publication).

Late submission will result in a late penalty mark, as follows:


Up to one week late, maximum mark of 40% for first attempts and 0% for resubmissions. No work will be accepted
more than one week after the submission deadline
(Academic Quality Handbook 2016/17 7.5 (5))

AIM(S)

To provide the student with the essential software concepts involved in the implementation, testing and
debugging of programs. Simple design concepts and good programming practices will be adopted
throughout the module.

LEARNING OUTCOMES

Upon the successful completion of this module, the student should be able to demonstrate the ability to:

1. Demonstrate an understanding of programming by analyzing and developing solutions to a variety


of problems, using software libraries/frameworks if and where appropriate.

2. Determine appropriate fundamental concepts and techniques that can be deployed in the solution of
problems/scenarios.

2
ASSIGNMENT

COMPONENT: 1 + 2 (50% Each)

The assignment comes in two sections, each section is worth 50% of the overall marks for the module and
the results for each section will be recorded separately (out of 100%)

COMPONENT WEIGHTING: 100 %

SUBMISSION DETAILS:

As this course is assessed by assignment only, a high quality deliverable is expected.

Check List

1) Create a main folder and name it with your student’s ID. Create another two folders and name them
as Assignment1_ student’s ID and Assignment2_ student’s ID. Save your programs into the
corresponding folders. Written report answering the questions and describing the code, should
be named as REPORT1_ student’s ID for first section and REPORT2_ student’s ID for second
section and save the reports in corresponding folders. Zip your main folder and upload it on
Moodle using advance upload.

FAILURE TO MEET THE ABOVE REQUIREMENTS MAY RESULT IN THE STUDENTS WORK NOT BEING
MARKED.

Title page: Including author name and affiliation (relationship with project).

Sections: Ensure a TOC ‘Table of contents’ page is provided at the beginning of the report listing
all report sections.

Numbering: Each report section including main headings and sub-headings should be
 numbered throughout.
All pages should be numbered, Arabic numerals (1, 2, 3, etc.) on all pages consecutively
throughout the text, appendices, and bibliography.

Consistency: A document is consistent if, for example, it always uses the same type style
including face and size for document objects such as headings, sub-headings, references and
content text and all lines should have the same spacing etc.

Grammar: Technical documents use `passive voice' expressions, for example your report should
avoid using the word `I' as much as possible.

3
TASK DESCRIPTION

This assignment is designed to test your understanding of the coding concepts covered in class, your ability
to read & interpret code, your ability to test code and your ability to develop your own code.

The assignment comes in two sections, each section is worth 50% of the overall marks for the module and
the results for each section will be recorded separately (out of 100%)

You are advised to complete part A of both sections 1 and 2 first.

SECTION 1 – 50%

In a written report (2000 words) complete the following:

PART A (UNDERSTANDING)

1. Define variable and constant. State the difference between variable and constant. Why variable is
important in programming?

2. Explain data types and mention why it is necessary? Discuss about implicit and explicit type conversion
with suitable examples.

3. Explain control structures in programming. Also, discuss how decision-making changes the flow of the
execution. Describe the Boolean operations that can be used in decision-making.

PART B (INTERPRETATION)

The source code for an application has been provided in the appendix.

Run the code and describe how the application works, creating step by step instructions for using this
application. Preferably, illustrate your answer with appropriate screen shots and diagrams e.g. flow charts.

Read and provide a line-by –line explanation of how the code for this application has been implemented.
Take care to include a description of the concepts used including the arguments being passed, return types,
etc.

4
PART C (IMPLEMENTATION)

FULL PRINTED CODE LISTINGS MUST BE PROVIDED FOR MARKING AND


SCREEN SHOTS SHOULD ALSO BE TAKEN WHERE APPROPRIATE

YOU DO NEED TO COMPLETE ALL THE EXERCISES TO PASS THIS ASSIGNMENT, AND YOU MAY JUST
ATTEMPT ELEMENTS OF AN EXERCISE. THE FOLLOWING EXERCISES BECOME INCREASINGLY MORE
CHALLENGING, THE OBJECTIVE IS TO DEVELOP A SYSTEMATIC APPROACH TO SOLVING PROBLEMS

Please Note:
This assignment is designed to test your problem solving skills, thus marks will be awarded for: Identifying
specific problems in completing the exercise. o You may also constrain a problem (simplify it) to produce a
simpler solution that may act as
a stepping stone to solving the real problem
• Demonstrating solutions to these problems.
• A clear analysis of the solutions (the thought process behind them)
• Testing that demonstrates clearly that the solutions works under all circumstances

Exercise 1:
Allow the user to declare different types of variables to hold name of a customer, price of a product and
quantity. Also, try to find out the total price of the order.

Exercise 2:
Allow the user to enter the dimensions (x and y ) of shape shown below (Figure 1), then calculate and
display the area of shaded region (colourled portion).

X cm

Y cm

Figure 1

5
Exercise 3: (Challenging)
Build a fruit machine game but representing the 3 reels of symbols by numbers ranging from 0 to 9,
randomly chosen each time the player asks to take another go.

Figure 1 The 3 Reels of a Fruit Machine

To generate random numbers you may add the following function to


your code:

// Return a random value 0 to maxValue


// including 0 and maxValue themselves
} static Random rnd = new Random();
static int RandomValue(int maxValue)

{
return rnd.Next(initial_value, maxValue + 1);
}

The value of 9 will be treated as the “Jackpot” symbol. The


scoring will be as follows:

• Any combination of two of the same numbers (excluding nines) will pay a bonus of 5 points e.g.
757
889
6 5 5, etc.
• Any three of the same numbers (excluding nines) will pay a bonus of 15 points e.g. 7 7 7, 8 8 8,
5 5 5, etc.

• Any combination of two nines will pay a jackpot of 200 e.g.


599
989
9 9 6, etc.
• Three nines pay out the big jackpot of 2000 points.

6
The points the player has accumulated should be displayed and the player should be asked if they wish to
make another spin or quit. It could look something like this:

Spin? Yes
5 67
You lose, your points are
0 Spin? Yes
7 76
You win, your points are
5 Spin? Yes
999
You win, your points are 2010

Exercise 4: (Very Challenging)


Build a snakes and ladders game (Figure 2). You will need to consider how you will display the board,
and how you will represent the snakes, ladders and player. The interesting problem in this exercise is to
determine a method for moving the player up the ladder and down the snake.

Figure 2

SECTION 2 – 50%

In a written report (2000 words) complete the following:

PART A (UNDERSTANDING)

1. Define Arrays and explain the importance of arrays in


programming. Give relevant examples to support your answer.
2. Define function and discuss about function definition and explain the call by reference and call by
value with suitable examples.

PART B (TESTING)

In the application provided in the Appendix, there are three problems:

1. When choosing an option from the menu, try entering text instead of numbers.
2. When the user is asked if they wish to quit, the only input value that can be entered is “YES”.
Try other variations e.g. “Yes”, “yes”, “y”, etc.
3. Try displaying all the numbers entered.

Run the code perform a series of tests to check these problems exist then:

7
a. Write a description of these problems, what is causing the problem.
b. Create tests to simulate them (this may take the form of test documentation) and provide evidence
that you have run these tests.

PART C (IMPLEMENTATION)

FULL PRINTED CODE LISTINGS MUST BE PROVIDED FOR MARKING AND SCREEN SHOTS SHOULD ALSO BE
TAKEN WHERE APPROPRIATE

YOU DO NEED TO COMPLETE ALL THE EXERCISES TO PASS THIS ASSIGNMENT, AND YOU MAY JUST
ATTEMPT ELEMENTS OF AN EXERCISE. THE FOLLOWING EXERCISES BECOME INCREASINGLY MORE
CHALLENGING, THE OBJECTIVE IS TO DEVELOP A SYSTEMATIC APPROACH TO SOLVING PROBLEMS
Please Note:

This assignment is designed to test your problem-solving skills, thus marks will be awarded for:
• Identifying specific problems in completing the exercise. o You may also constrain a problem
(simplify it) to produce a simpler solution that may act as a stepping stone to solving the real problem
• Demonstrating solutions to these problems.
• A clear analysis of the solutions (the thought process behind them)
• Testing that demonstrates clearly that the solutions works under all circumstances

Exercise 1:
(a) Ask the user to enter an arbitrary set of numbers into an array and display all the entered
numbers.
(b) Then multiply pairs of numbers together and display the results. If you have an odd number
of numbers then just display the last number
e.g. “1” “2” becomes “2” “1”
“2” “8” becomes “2” “8”
“1” “2” “8” “4” becomes “2” “32”
“1” “2” “8” “4” “7” becomes “2” “32” “7”
Hint: To test for an even number you may use ((number%2) == 0).

Exercise 2:
(a) A user is allowed to enter the goals obtained by two players over a series of ten games (the nature of this
game is not important). Each game is scored based on goals and the goals obtained by each player should
be entered e.g. 2 goals vs 3 goals (Player1 wins).
(b) For each game they play they are award 2 points for a win, 1 point for a draw and no points if they lose.

(c) Once the results for all the games are entered, the points obtained by both players should be
displayed and the player with the highest points should be highlighted with a special message.

Note: You don’t need to display the scores for all the games that have been entered, just the total
points for each player. It might look like this:
8
Exercise 3:
Investigate the errors discovered while testing in Part B and fix
them.

CRITERIA SECTION 1
Research-Informed Literature

PART A %Max
Knowledge of Variables 10
Knowledge of Code Blocks 15
Knowledge of Branching 15
Knowledge and Understanding of Subject

PART B %Max
Description of the application 5

Analysis

PART B %Max
Description of the code 15
Practical Application and Deployment

PART C %Max
Exercise 1 5
Exercise 2 10
Exercise 3 10
Exercise 4 15

MARKING CRITERIA SECTION 2


Research-Informed Literature

PART A %Max
9
Knowledge of Arrays 20
Knowledge of Functions 20
Analysis

PART B %Max
Test Report 10
Software tests 10
Practical Application and Deployment

PART C %Max
Exercise 1 10
Exercise 2 10
Exercise 3 20

COMMON ASSESSMENT AND MARKING CRITERIA

OUTRIGHT FAIL UNSATISFACTORY SATISFACTORY GOOD VERY GOOD EXCELLENT EXCEPTIONAL

0-29% 30-39%* 40-49% 50-59% 60-69% 70-79% 80-100%


Assessment Criteria
1. Research-informed Little or no evidence of Poor evidence of References to a limited Inclusion of a range of Inclusion of a wide A comprehensive range Outstanding knowledge of
reading. reading and/or of range of mostly research-informed range of of research informed researchinformed literature
Literature Views and findings reliance on relevant sources. Some literature, including researchinformed literature embedded in embedded in the work. Outstanding
Extent of research unsupported and inappropriate sources, omissions and minor sources retrieved literature, including the work. Excellent selection of relevant and credible
nonauthoritative. and/or indiscriminate errors. independently. sources retrieved selection of relevant sources. Highlevel referencing skills
and/or own reading, Referencing
Referencing use of sources. Referencing independently. and credible sources. consistently and professionally
selection of credible conventions largely Referencing conventions evident conventions mostly Selection of relevant High-level referencing applied.
sources, application of ignored. conventions used though not always consistently applied. and credible sources. skills, consistently
inconsistently. applied consistently. Very good use of applied.
appropriate referencing
referencing
conventions conventions,
consistently applied.

2. Knowledge and Major gaps in Gaps in knowledge, Evidence of basic Knowledge is accurate Knowledge is extensive. Excellent knowledge Highly detailed knowledge and
knowledge and with only superficial knowledge and with a good Exhibits understanding and understanding of understanding of the main
Understanding of understanding of understanding. Some understanding of the understanding of the of the breadth and the main concepts and theories/concepts, and a critical
Subject material at this level. significant inaccuracies. relevant concepts and field of study. depth of established key theories. Clear awareness of the ambiguities and
Extent of knowledge and Substantial underlying principles. views. awareness of challengeslimitations of knowledge.
inaccuracies. to established views
understanding of and the limitations of
concepts and underlying the knowledge base.
principles associated
with the discipline.

10
3. Analysis Unsubstantiated Some evidence of Evidence of some Evidence of some Sound, logical, Thoroughly logical Exceptional work; judiciously
generalisations, made analytical intellectual logical, analytical logical, analytical analytical thinking; work, supported by selected and evaluated evidence.
Analysis, evaluation and without use of any skills, but for the most thinking and some thinking and synthesis. synthesis and evaluated evidence. Very high quality analysis, developed
synthesis; logic, credible evidence. Lack part descriptive. attempts to synthesise, Can analyse new and/or evaluation. Ability to High quality analysis, independently or through effective
of logic, leading to Ideas/findings albeit with some abstract data and devise and sustain developed collaboration.
argument and sometimes illogical and situations without independently or Ability to investigate contradictory
unsupportable/ missing weaknesses. Some persuasive arguments,
judgement; analytical conclusions. Lack of any
contradictory.
evidence to support
guidance.
and to review the
through effective information and identify reasons for
Generalised statements An emerging awareness collaboration. contradictions.
reflection; organisation attempt to analyse, findings/ views, but
of different stances and
reliability, validity &
Ability to investigate Highly persuasive conclusions
made with scant
of ideas and evidence synthesise or evaluate. evidence not ability to use evidence significance of
evidence. Conclusions contradictory
consistently to support the evidence. Ability to
lack relevance. information and
interpreted. Some argument. communicate ideas and
identify reasons for
relevant conclusions Valid conclusions and evidence accurately contradictions. Strong,
and recommendations, recommendations, and convincingly.
persuasive, conclusions,
where relevant where relevant Sound, convincing
justifiable
conclusions /
recommendations.
recommendations.
4. Practical Application Limited or no use of Rudimentary An adequate A good and appropriate A very good application An advanced Outstanding levels of application
methods, materials, application of methods, awareness and mostly application of standard of a range of methods, application of a range of and deployment skills. Assimilation
and Deployment tools and/or materials, tools and/or appropriate application methods, materials, materials, tools and/or methods, materials, and development of cutting edge
Effective deployment of techniques. techniques but without of well established tools and/or techniques. tools and/or processes and techniques.
appropriate methods, Little or no appreciation consideration and methods, materials, techniques. Very good techniques. The
of the context of the competence. Flawed tools and/or Good appreciation of consideration of the context of the
materials, tools and application. appreciation of the techniques. the context of the context of the application is well
techniques; extent of context of the Basic appreciation of application, with some application, with considered, with
application. the context of the use of examples, where perceptive use of
skill demonstrated in the extensive use of
application. relevant. examples, where
relevant examples.
application of concepts relevant.
Application and
Evidence of some
to a variety of processes innovation and
deployment
and/or contexts; extend beyond
creativity.
established
formulation of conventions.
innovative and creative Innovation and
solutions to solve creativity evident
throughout.
problems.
5. Skills for Professional Communication media Media is poorly Can communicate in Can communicate Can communicate Can communicate Can communicate with an
is inappropriate or designed and/or not a suitable format but effectively in a suitable well, confidently and professionally and, exceptionally high level of
Practice misapplied. suitable for the with some room for format, but may have consistently in a confidently in a suitable professionalism.
Demonstrates attributes Little or no evidence of audience. improvement. Can minor errors. suitable format. Can format. Can work exceptionally well and
autonomy in the Poor independent or work as part of a Can work effectively as work very well as part Can work professionally professionally within a team,
expected in professional
completion of tasks. collaborative team, but with part of a team, with of a team, with very within a team, showing showing advanced leadership skills.
practice including: Work is poorly initiative. Work lacks limited involvement clear contribution to good contribution to leadership skills as Work is exceptionally coherent, very
individual initiative and structured and/or structure, in group activities. group activities. group activities. appropriate, managing fluent and is presented
organisation, and/or Work lacks coherence Mostly coherent work Work is coherent and conflict and meeting
collaborative working; largely incoherent.
in places and could be fluent and is well obligations.
professionally.
coherence and is in a suitable
deployment of better structured. structure. structured and Work is coherent, very
appropriate media to organised. fluent and is presented
professionally.
communicate (including
written and oral); clarity
and effectiveness in
presentation and
organisation.

PAGE INTENTIONALLY
LEFT BLANK

11
APPENDIX:

using System; using


System.Collections.Generic;
using System.Linq; using
System.Text; using
System.Threading.Tasks;

namespace Assignmen2014_15
{
class Program
{ const int MAXNUMBERS =
3;

static void Main(string[] args)


{
int[] theNumbers = new int[MAXNUMBERS];
int chosenOption = 0; bool quit = false;

InitialiseNumbers(theNumbers);

while (quit == false)


{
DisplayHeader();
DisplayMenu();
chosenOption = ReadNumber("Please choose an option: ");
quit = ProcessMenu(chosenOption, theNumbers);
Console.Clear();
}
}

14

static void InitialiseNumbers(int[] numbers)


{
for (int index = 0; index < MAXNUMBERS; index++)
{ numbers[index] =
0;
}
}

static void DisplayHeader()


{
WriteText("*******************************************************************************", 0, 0); // Top left hand corner of screen
is x = 0, y = 0
WriteText("* This application is designed to allow you to choose numbers *", 0, 1); // Next line down is x = 0, y = 1, etc WriteText("* and
finds the biggest and the smallest value *", 0, 2);
WriteText("*******************************************************************************", 0, 3);
}

static void DisplayMenu()


{
WriteText("Select an option", 20, 8); // Display menu at at x = 20, y = 8
WriteText("1. Enter the numbers", 20, 9); WriteText("2.
Find the smallest", 20, 10);
WriteText("3. Find the largest", 20, 11);
WriteText("4. Display all numbers", 20,
12); WriteText("5. Quit", 20, 13);
}

static void WriteText(string text, int x, int y)


{
Console.CursorLeft = x;

15

Console.CursorTop = y;
Console.Write(text);
}

static int ReadNumber(string prompt)


{
string text; int
number;

WriteText(prompt, 20, 14);


text = Console.ReadLine();
number = int.Parse(text);

ClearText(20, 14, prompt.Length + text.Length); // Clear the text at this line

14
return number;
}

static void ClearText(int x, int y, int length)


{
// Write space ' ' characters starting at x, y for 'length' times
WriteText(new String(' ', length), x, y);
}

static bool ProcessMenu(int option, int[] numbers)


{
bool quit = false;

switch (option)
{
case 1:
GetNumbers(numbers);
break; case 2:
WriteText(string.Format("The smallest value is {0}", FindSmallest(numbers)), 20, 15);
Console.ReadKey(); // Pause
break; case 3:
WriteText(string.Format("The largest value is {0}", FindLargest(numbers)), 20, 15);
Console.ReadKey(); // Pause
break; case 4:
quit = IsQuitting();
break; case 5:
quit = IsQuitting();
break; default:
WriteText("Unknown option value entered", 20, 15);
Console.ReadKey(); // Pause break;
}

return quit;
}

static void GetNumbers(int[] numbers)


{
for(int index = 0; index < MAXNUMBERS; index++)
{
numbers[index] = ReadNumber("Enter number: ");
}

static int FindSmallest(int[] numbers)


{
int smallest = numbers[0];

16
for (int index = 0; index < MAXNUMBERS - 1; index++) // <-- subtract 1
{
if(numbers[index + 1] < smallest)
{
smallest = numbers[index + 1];
}
}

return smallest;
}

static int FindLargest(int[] numbers)


{
int largest = numbers[0];

for (int index = 0; index < MAXNUMBERS - 1; index++) // <-- subtract 1


{
if (numbers[index + 1] > largest)
{
largest = numbers[index + 1];
}
}

return largest;
}

static bool IsQuitting()


{
string response; bool
quit = false;
WriteText("Do you really wish to quit? ", 20,
13); response = Console.ReadLine();

if (response == "YES")
{
quit = true;
}

return quit;
}

}
}

19

18

You might also like