Professional Documents
Culture Documents
MT262B TMA Spring Feb2011 2
MT262B TMA Spring Feb2011 2
Assignment Booklet
Please send all your answers to each tutor-marked assignment (TMA) to reach your tutor on or
before the appropriate cut-off date shown above.
The marks allocated for each part of the assignment question are indicated in brackets at the
beginning of the corresponding part.
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own TMA work and
avoid plagiarism. You must provide all references in case you use and quote another person's
work in your TMA. You will be penalized for any act of plagiarism as per the AOU's rules and
regulations.
1
TMA MT262B Cut-off date 30 April 2011
Please use a compressed file (.zip or .rar) containing your answers. Please use the following
format for the name of the compressed file containing your solution:
Explain in your own words (not more than 20 words) what each of the following terms
mean: [3 marks each]
i- Events tab
ii- VCL
v- A stack
This question is based on Block III – Unit 1 (Graphical User Interfaces) and Block III –
Unit 2 (Designing Interfaces). It is intended to test your ability to work with Boralnd’s
IDE to develop a simple application and make use of the IDE’s help system.
Write a C++ code to implement the following application. Make sure to define all
variables that you will use:
2
Enter two integer numbers in the first (From) and second (To) edit boxes respectively.
The two entered values represent the starting and ending values of a series respectively.
Negative values are not allowed and the starting value must be greater or equal to the end
value, otherwise the calculation will not take place and the result will always be zero.
If you choose Sum from the operation combo box and All from the specification edit box
then your decision is to sum all the series numbers.
If you choose Sum from the operation combo box and Odd from the specification edit
box then your decision is to sum only the odd numbers in the series.
If you choose Sum from the operation combo box and Even from the specification edit
box then your decision is to sum only the even numbers in the series.
The same previous scenario will be applied if the choice was for Mult instead of Sum.
If you press on “Calculate” button or if you use the short cut by pressing Alt key + c,
the result will be printed in the result edit box and the focus will be on the Form edit
box.
If you press on “Clear” button or if you use the short cut by pressing Alt key + r, all
edit boxes will be cleared and the focus will be on the Form edit box.
If you press on “Exit” button or if you use the short cut by pressing Alt key + x, the
application will be closed.
The initial design is shown as below and you should make sure to follow the same design
given to you.
3
Question 3 (40 marks)
This question is based on Block III – Unit 1 (Graphical User Interfaces), Block III – Unit
2 (Designing Interfaces) and Block IV – Unit 1 (Introduction to Computer Graphics). It is
intended to test your ability to work with Borland’s IDE to develop a simple application
and make use of the IDE’s help system.
Enter an integer number in the left edit box which consists of, at most, 4 digits. If the
number’s digits are more than 4 digits then the edit box will be cleared and the focus will
be on the same edit box in order to enter a new valid value. If you entered a negative
number then the absolute value of the number will took place before further calculations.
4
2. The number will be printed in the most right edit box where you could not
update it.
3. The left edit box will be cleared and the focus will be on it.
The run time design when the value 1234 is entered is shown as below.
Question 4 (5 Marks)
Write in not more than 5 lines the advantages and disadvantages of using Borland C++ /
version 5.
5
What to submit to your tutor:
a. A text document (you can use Microsoft Word) containing the answers of
questions one and four.
b. One folder containing the solutions of questions two and three. For each solution,
you should submit question files that end with the extensions: .bpr, .res, .dfm, .lib,
.cpp, .h. Any other extension is not required such as .obj, .~cpp, …
c. Name your application of each question by the number of the question itself (eg.:
The project file and the cpp file of question 2 must be Q2.bpr and Q2U.cpp and so
on).