Programming for Computing 07    Assignment 1 - 40%

Write a program in VB.NET to process a series of exam marks. Input boxes are to be used for input and text boxes for output. The font of any text boxes should be set to Courier New (so that every character occupies the same width) and to size 8. Set ScrollBars to Both, and Multi-line to True.A single button should initiate the calculation.

For testing/debugging purposes you may also find it useful to create a button which uses the TextBox1.Clear() instruction to clear any text boxes.

Graduated Tasks - task 1 - Statistics - (10 marks)

The program should accept a series of exam marks, ended by -1. (The marks are only to be entered once.) When the -1 is entered, it should display the following results in a text box, using AppendText, and it should display a "Done" message box when terminating.

TaskMark
The average (mean) mark 4
The smallest and largest mark. 3
"Great work" if at least 80% of the students passed (got 40% or above). If not, it should display "High failure rate" 3

Task 2 - Bar Chart - (5 marks)

It should display a bar chart of the marks in another text box, as in:

----------------------------------------------------
|Mark                                              |
|13  *************                                 |
|21  *********************                         |
|7   *******                                       |
| ...etc                                           |
|                                                  |
|                                                  |
|                                                  |
----------------------------------------------------

Asterisks should be used as shown. Do not take account of marks which don't fit across. Note that the asterisks should ideally start from the same character position.

.

Task 3 - Copying - (10 marks)

Assume that the marks have been entered in order of seating, and the lecturer suspects copying from nearby students. In the case that three adjacent students have identical marks, display the following before the average: their mark, and their three positions.

Example

Suspect mark: 51
Students numbered: 13  14  15

Do not use an array , string, file, list, or collection for this task. Assume that only one group of copiers exists

Task 4 - (5 marks)

In a page or less, discuss in general the advantages/disadvantages of using text boxes, versus the use of pop-up boxes for input and output.

Program style - (6 marks)

ItemMark
Uses a procedure (sub) 2
Naming 2
Comments 2

You also get up to 4 marks for your tutorial work: you got                                                                  _________________

Handing-in, and demonstration

Hand in by 3pm on Mon 15th Dec, at Furnival reception.

You must hand in a paper version of a Word doc, containing your answer to Task4, and your VB code. The code must be formatted in Courier New font, Bold, with a size of 10. It will not be marked otherwise. Following the hand-in, you will demo your program to me in your tutorials w/c 15th Dec.. Attendance is compulsory. The date on your file must not be after the hand-in date.

Note that this is an individual assignment, and the SHU policy on cheating will be applied.