Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

HET ASSIGNMENTS 2016

Qualification Title

Diploma in Information Technology

SAQA
ID

NQF
level

Module Name

67292

Level
6

Programming
3B

Year
of
Stud
y
3rd

Module Semester Assignment Assignment


Code
Number
Title
PRG
320

2nd

Individual
Assignment

DUE DATE:
10-14 October 2016
TOTAL MARKS:
100 Marks
PASS MARK:
50%
WEIGHTING:
20% towards DP mark
DEVELOPER:
NEELOFAR SHAIK
MODERATOR:
LESLEY SAMANEKA
INSTRUCTIONS TO STUDENTS:
1. Read the following instructions CAREFULLY before answering the paper.
2. Your assignment should comprise of a single word document and project
folders(practical work) per question on a disk. Your assignment should
both be typed Arial font 12, 1.5 spacing respectively.
3. Learners must include the following:
3.1 Coversheet
3.2 Contents page
3.3 Source code and screenshots of interface design and running programs.
The use of comments in your program is essential.
3.4 Glossary of terms
3.5 Bibliography, (proof of research).
4. Use the Harvard method of referencing.
5. You must consult many sources of information for adequate referencing.
6. Technical requirements for assignments:
Assignments must be presented in the correct format. Marks will be awarded in
conjunction with contents for overall presentation consisting of the following
variables: contents page, source code and running programs as well as
bibliography.
7. Ensure that your name and the name of your Campus are clearly indicated on
the cover page of your assignment.
8. Keep copies of all assignments handed in.
9. Failure to adhere to the above will result in marks being deducted.
10. No group work may be done on an Individual Assignment.
11. Plagiarism and copying of assignments will result in the default mark 0% being
awarded. This is also a punishable offence, which will lead to a disciplinary
action.

Programming 3B
Damelin
Assignment

Page 1 of 5

Individual Assignment

Plagiarism and Copying


What is plagiarism?
Plagiarism is the use of other people's work without acknowledging the original work. Plagiarism is stealing
somebodys intellectual property. It is pretending that someone elses work is your own. Committing plagiarism
is unacceptable to Damelin, and will result in serious consequences for any person who is found guilty of
plagiarism.
How is plagiarism committed?
i)
Cutting and pasting from electronic sources or copying from books, magazines, journals, etc.
content, diagrams, tables, phrases & quotations in ones own document.
ii)
Copying from the work of another student.
iii)
Allowing a fellow student to copy your work.
iv)
Using too many direct quotations
v)
Rewriting someone elses ideas in your own words (paraphrasing) without referencing the source.
How can you avoid plagiarism?
If you use any secondary sources from books or the Internet while completing your assignments, you
need to reference the original source, otherwise you will be accused of plagiarism and disciplinary
action will be taken against you by the College.
Carefully and accurately acknowledge the source that you used to obtain information and ideas
from. As you read, write down the details of the sources. Supply a list of references at the end of
your essay, report or assignment.
You may talk to other people to help you work through the assignment, as long as the work you
submit will be your own work and not an assignment completed for you by another person, or one
that you have copied from the learning material.
You are not allowed to copy verbatim (word-for-word) from the learning material and submit this as
your own work. You are not allowed to use the same examples that have been used in the learning
material and submit this as your own work.
Declaration of Authenticity
A critical aspect of any assignment is authenticity. Because you are completing much of the work for the
assignments unsupervised, the examiner must be convinced that it is all your own work. For this reason,
you must complete the Declaration of Authenticity and have it counter-signed by your manager, mentor or
lecturer.
The declaration of authenticity is a legal document, and if found that you have made a false
declaration, then not only will your results be declared null and void, but you could also have
criminal charges brought against you. It is not worth taking the risk!
Please complete the declaration of authenticity below for all assignments:

DECLARATION OF AUTHENTICITY
I.......................................................
Full Name & Surname
ID number

.......................

Hereby declare that the contents of this assignment are entirely my own work.
........................................................
Signature
Date
Programming 3B
Damelin
Assignment

Page 2 of 5

................

Individual Assignment

Question1

[25 Marks]

Create any simple console application for each of the exception classes listed below and use
exception handling to prevent your programs from abruptly terminating.
NB. You should have 5 programs in total.
System.ArithmeticException
System.ArrayTypeMismatchException
System.FormatException
System.IndexOutOfRangeException
System.ArgumentException

Question 2

[50 Marks]

Create an application that simulates the Monty Hall problem in which three prizes of varying value
are assigned randomly to three doors that you can implement as buttons. For example, the prizes
might be a new car or a live goat. The player chooses a button and then one of the two other prizes is
revealed; the one revealed is never the most desirable prize. The user then has the option of
changing the original selection to the remaining unseen choice. For example, consider these two
game scenarios:

Suppose the new car is randomly assigned to the first button. If the user chooses the first
button, reveal either of the other two prizes and ask the user if he wants to change his
selection.

Suppose the car is assigned to the first button, but the user chooses the second button.
Reveal the third prize so that the cars location is still hidden, and then ask the user whether
he wants to change the selection.

Programming 3B
Damelin
Assignment

Page 3 of 5

Individual Assignment

Insert a picture into the PictureBox using code only.


Include two linkLabels as seen below. Use event handling to display a description of the site in a label
when the mouse hovers over the link and go to the respective site when the linkLabel is clicked.

Programming 3B
Damelin
Assignment

Page 4 of 5

Individual Assignment

Question 3

[25 Marks]

Create a class named Circle with fields named radius, area, and diameter. Include a constructor that
sets the radius to 1. Also include public properties for each field.

The Radius property should have get and set accessors, but Area and Diameter should be read-only.
The set accessor for the radius should also provide values for the diameter and area. (The diameter
of a circle is twice its radius; the area is pi multiplied by the square of the radius. You can use the
public Math class property Math.PI
for the value of pi.)

Create a class named TestCircles whose Main() method declares three Circle objects. Assign a small
radius value to one Circle and assign a larger radius value to another Circle. Do not assign a value to
the radius of the third circle; instead, retain the value assigned at construction. Display the radius,
diameter, and area for each Circle. Display the area to two decimal places.

Programming 3B
Damelin
Assignment

Page 5 of 5

Individual Assignment

You might also like