You are on page 1of 13

DIPLOMA

PROGRAMMING
AND
WEB APPLICATIONS
(D 24)

TUESDAY 8TH JUNE 2010

TIME: 14.00 –17.00 HOURS

DURATION: 3 HOURS

Candidates should attempt FIVE questions only. Clearly cross out



surpl
us’answer s;f
ailuretodosowi l
lresultint hef i
rst5answers being
marked.

No reference material of any kind may be taken into the examination.

[Turn over]

© Institute for the Management of Information Systems –J. 2010.

Page: 1 of 5
Candidates should attempt FIVE questions only. Clearly cross out

surplus’answer s;failuretodosowi llresultint hefirst5answer sbeing
marked.

Question 1.

a) Computer Languages can be classified under one of FOUR main


headings. Theses are:-
 Machine Code.
 Assembler Languages.
 High Level Languages.
 Fourth Generation (4GL).

With the aid of an example describe briefly EACH of the FOUR


classifications. ( 8 marks)

b) When designing a microchip for use in a computer, Machine Code


is frequently used. Give and explain FOUR reasons why this is so.
(12 marks)
(Total 20 marks)

Question 2.

When designing programs, one method that can be used is the Hierarchy
Chart which uses four features:-
  Elementary Components.
  Sequences.
  Selections.
  Iterations.

a) For EACH of the FOUR features, and by use of a simple problem


of your choice, describe their role in the construction of a Hierarchy
Chart. ( 8 marks)

b) A Stock Master File is to be updated. Use the following criteria to


produce a Hierarchy Chart:-
 Items are to be issued from stock, an invoice produced, and
the master file updated.
 Items that cannot be issued from stock are ordered.
 Stock is ordered when the stock falls to a pre-determined level.
 All data input is to be validated.
 It is possible that more than one item may be issued from
stock to the same customer at the same time.
 A 'total sales' value is to be printed at the end of the day.
(12 marks)
(Total 20 marks)
[Turn over]

© Institute for the Management of Information Systems –J. 2010.

Page: 2 of 5
Question 3.

AsaTraini
ngManagerf
oralar
geITuser
,youhavetopr
oducea‘user
f
ri
endl
y’gui
de/
tr
aini
ngai
dforanappl
i
cati
onpackagef
ort
hec ompany’
sst
aff
.

a) List FIVE contents of the user guide/training aid that would be


required to ensure that the user would be able to learn how to use
the program. ( 5 marks)

b) For EACH of the contents listed in part a), explain why it is required
and how it will assist the user to learn the package. (15 marks)
(Total 20 marks)

Question 4.

Two facilities that have been incorporated in application package software


help the user work more efficiently. They are:-
 GUI.
 WIMPS.

a) Using examples, explain EACH of the TWO terms. ( 6 marks)

b) Give and explain FOUR ways showing how WIMPS can help a
novice user to become more efficient in using the application
package. (12 marks)

c) Explain how a GUI will help the user to ensure that the correct
application package is loaded. ( 2 marks)
(Total 20 marks)

[Turn over]

© Institute for the Management of Information Systems –J. 2010.

Page: 3 of 5
Question 5.

When the programmer has to incorporate a decision in a Visual Basic


program, the two methods are CASE and IF functions.

a) Using an example, explain how a CASE functions. ( 2 marks)

b) Although CASE and IF perform the same type of tasks, give TWO
reasons why you would use CASE rather than IF. ( 4 marks)

c) Using the following scenario, produce a set of working coding using


the CASE function.

The following table is used to describe the degree of cloudiness.


The user is required to input cloud cover as a percentage and then
the program displays the appropriate description.

Percentage of Cloud Description


Clover
0 Clear
1 –50 Partly cloudy
51 –99 Cloudy
100 Overcast
(14 marks)
(Total 20 marks)

Question 6.

Whendat
aisst
oredi
nacomput
ert
het
erm‘
fi
l
e’comesst
rai
ghtt
omi
nd.

a) Explain the term ‘


file’
. ( 2 marks)

Whenabank’ scust omerusesanAutomatic Teller Machine (ATM) machine to


withdraw some money from their account, most people assume that their
bank account is updated immediately. However, this is not always the case.
What usually occurs is that all transactions are added to a transaction (or
movement) file and is then used at the end of the day to update the master
file.

b) Give and explain FOUR reasons why banks might prefer this mode
of processing than updating in real time. ( 8 marks)

c) Produceas etofcodi ngt hatwi llal


l
owthecus t
omer
’st
ransac t
ionto
be added to the transaction (or movement) file. (10 marks)
(Total 20 marks)

[Turn over]

© Institute for the Management of Information Systems –J. 2010.

Page: 4 of 5
Question 7.

When designing a web page, HTML has three different list types that can be
used.

a) With the aid of examples describe the THREE types of lists.


( 6 marks)

There is sometimes a need for lists to be nested.

b) With the aid of an example, explain when you would need to use a
nested list. ( 4 marks)

c) Using the example given in part b), produce a set of coding where a
set of nested lists is used. (10 marks)
(Total 20 marks)

Question 8.

There are times when a web page programmer needs to incorporate Forms in
their web page to enable the user to input data.

a) Produce a set of coding that will display a Form where the user
inputs their name and has the option to display their name in
uppercase. (10 marks)

b) Produce a set of coding that can be added to the coding produced


i
npar ta)wher et heus er’snamei sdi spl
ayed,anddependi ngupon
whether the user wants their name displayed in either uppercase or
not. (10 marks)
(Total 20 marks)

END OF EXAMINATION.

© Institute for the Management of Information Systems –J. 2010.

Page: 5 of 5
D 24 –PROGRAMMING & WEB APPLICATIONS JUNE 2010
SOLUTIONS & MARKING SCHEME.
Question 1 answer.

a) The following are examples:-


Machine code is a set of digits, in either binary, octal, hexadecimal etc
notation. The first part of the code is the function code to be executed and
the second part is the operand address where the operation is to take
place.
‘ Assembler Languages’is a term used to describe a language that is
written in mnemonics. It consists of a function code (LDA) and an operand
(1,5). There may at times be a label (A5).
‘ High Level language’is a language that is a 'problem oriented language’
and is very similar to written English, i.e. MOVE RESULT TO EDIT-RES.
This language overcomes the restrictions of the individual
restraints/characteristics of different type of computers and thereby the
same program can be run on different types of computers.
A 4GL can best be summed up as a form of application generator which
allows the user to manipulate (process) data without knowing how or what
is being done.
2 marks for a description to a max of 8

b) The main reasons why machine code is used are:-


The coding is small in physical size.
Operations can be broken down into a few basic steps.
Enables manipulation of the computer's components.
Very fast execution.
Does not need compiling.
No chance of ambiguous coding.
Etc.
3 marks for an explanation to a max of 12
(Total 20 marks)

© Institute for the Management of Information Systems –J.2010.

Page: 1 of 8
Question 2 answer.

a)
Elementary is the lowest level of a Hierarchy Chart and at most will define
a simple action/line of coding and can not be further divided.
A sequence is when two or more 'parts' are performed. These parts may
not necessarily be elementary components.
A selection is when there is a choice of one or more elementary or
sequence components that can be performed.
An iteration is a single part that can be repeated zero or more times
depending upon a specific condition.
2 marks per description to a max of 8 marks

b) This part will vary depending upon the way the student has been taught
and each one will be judged on its merit
12 marks for a complete Hierarchy Chart else pro rata to a max of 12 marks
(Total 20 marks)

Question 3 answer.

a) The following is what I would like to see included if I was to purchase the
program:-
Installing the package.
Starting the program.
Running a demo version.
Valid/invalid test data.
Running a test data option (this will allow the student to save it and recall it
at a later date).
Input/output screens.
Samples of input data and expected output results.
Error recover; both operating system level and program level.
Backup instructions.
1 mark per content to a max of 5 marks

b) This part will depend upon the first part. A suitable response would be
along the lines of:-
Installing the package –to ensure that it has been installed correctly and
that all the relevant completes are made available.
Starting the program –to ensure that the program starts at the beginning
andnotata‘ subrout i
ne’l
ev el
.
Running a demo version –to show what can be done.
Etc.
2 marks for an explanation and 1 mark for an assistance to a max of 15 marks
(Total 20 marks)

© Institute for the Management of Information Systems –J.2010.

Page: 2 of 8
Question 4 answer.

a)
GUI is a graphical user interface that will display on the screen the
‘fil
es’et cthatar eav ai labl
ef ortheus ert ouse.I tmaybet hatnotal lthe
files are available ont hatscr eenbutar egr oupedundera‘ c ommon’
icon. In this case that icon must be clicked on to reveal the relevant
files.
WIMP is Windows, icons, mouse, pointer. This enables the user to
perform numerous tasks without having to use a keyboard. For
example select File, Open and a file will be loaded.
2 marks for an explanation and 1 mark for an example to a max of 6

b) The most common are as follows:-



The user does not have to know the commands line instructions.

Theywi l
l‘al
way s’wor k.

The user does not have to be in the correct location (folder).

All the commands are readily accessible.

Etc
2 marks for an efficiency and 1 mark for an example to a max of 12

c) A common response would be that by using icons and shortcuts a user


canus et hemac hine’sfunct
ions and facilities without either knowing
what they are doing and why it is being done; hence the lack of
knowledge and understanding of how the machine functions.
2 marks for an explanation
(Total 20 marks)

© Institute for the Management of Information Systems –J.2010.

Page: 3 of 8
Question 5 answer.

a) Simply the CASE function will be followed by a value, either a number


(selecting an option when calling a call centre) or string, and if the comparison
valuei s‘correct’thent henest edsetofcodi ngi sex ecut ed.Al l otherCASE
options are ignored and the program continues after the last set of CASE
coding.
2 marks for an explanation to a max of 2

b) The following are acceptable:-


Easy to read.
Easy to amend.
Canal l
owawi derrangeof‘ v
alues’f
orcompar ison.
No need to indent the text.
Etc.
2 marks for an explanation to a max of 4

c) The following coding is a suitable response:-


Private Sub cmdDescribe_Click()
Dim percentage As Single
PicCloudCover.Cls
Per cent=Val (
InputBox (
“Per cent ageofcl oudcov er:”)
)
Select Case percent
Case 0
PicCloudCov er.Pri
nt“ Cl ear ”
Case 1 to 50
PicCloudCov er.Pri
nt“ Par tl
ycloudy”
Case 51 to 99
PicCloudCov er.Pri
nt“ Cl oudy ”
Case 100
PicCloudCov er.Pri
nt“ Ov ercast”
Case Else
PicCloudCov er.Pri
nt“ Per centagemustbebet ween0and100. ”
End Select
End Sub
12 marks for a complete set else pro rata
2 marks for error trap to a max of 14
(20 marks)

© Institute for the Management of Information Systems –J.2010.

Page: 4 of 8
Question 6 answer.

a) Brief
ly,t het
erm‘
fi
l
e’i
susedt
odescr
ibeac
oll
ect
ionofr elateddat a
records.
2 marks for an explanation

b) The most common responses are:-


Speed: Only the details of the transaction are recorded.
Minimal updating: Only the outstanding balance and remaining amount
that can be withdrawn that day are amended.
Resource usage: There is no continual searching and disk head
movement to update the records.
History: There is a history of all transactions which can be used to check
any fraudulent transactions.
Etc.
2 marks for an explanation to a max of 8

c) A suitable set of coding is:


Private Sub cmdAppendMovementFile_Click()
Dim date As String, time As String, place_of_the_machine As String

Enabl esac ustomer ’sdet ailstobeappendedt oamov ement sf i
le
Open“ f
ilespec”f orappendAs#n
Wr i
te#n,Cust omer _ac count_number ,Amount _withdrawn,“ date”,
“t
ime”,“ place_of _the_machi ne”,etc
Close #n
End Sub
10 marks for a complete set else pro rata to a max of 10
(Total 20 marks)

© Institute for the Management of Information Systems –J.2010.

Page: 5 of 8
Question 7 answer.

a) HTML has three types of lists:-


Unordered lists are like the bullet points on this solution –they do not
order the text in any way. (Hence the name!)
Ordered lists are usually numbered, so they order the text in some way.
Definition lists are special lists that contain a term and then its definition.
2 marks for a description to a max of 6

b) There will be times when a list can be further subdivided. For example, a
list of fruit where the fruit will be primarily listed by the group name e.g.
apple, and then listed by their type e.g. Bramley, Cox etc.
4 marks for an explanation to a max of 4

c) A common response is:-


<ol>
<li>Apple</li> 1. Apple
<ol> 1. Golden Delicious
<li>Golden Delicious</li> 2. Granny Smith
<li>Granny Smith</li> 3. Gala
<li>Gala</li> 2. Orange
</ol> 3. Lemon
<li>Orange</li>
<li>Lemon</li>
</ol>

10 marks for a complete set else pro rata to a max of 10


(Total 20 marks)

© Institute for the Management of Information Systems –J.2010.

Page: 6 of 8
Question 8 answer.

a) The following is a suitable response:-


<HTML>
<HEAD>
<TITLE>My First Web Page</TITLE>
</HEAD>
<BODY>
<Hl>Hello</Hl>
Type your name into the text box.
<INPUT TYPE=text NAME="txtBox" VALUE="" SIZE=20>
<BR><BR>
<INPUT TYPE=checkbox NAME="chkBox" CHECKED=True>
Display name in uppercase.
<BR><BR>
<INPUT TYPE=button NAME="cmdShow" VALUE="Show Greeting">
</BODY>
</HTML>
10 marks for a complete set of coding else pro rata to a max of 10

b) The following is a suitable response:-


<HTML>
<HEAD>
<TITLE>My First Web Page</TITLE>
<SCRIPT LANGUAGE="VBSCRIPT" >
Sub cmdShow_onClick()
Dim msg
msg = txtBox.Value
If chkBox.Checked = True Then
MsgBox "Greetings " & UCase(msg)
Else
MsgBox "Greetings " & msg
End If
End Sub
</SCRIPT>
</HEAD>

<BODY>
<Hl>Hello</Hl>
Type your name into the text box.
<INPUT TYPE=text NAME="txtBox" VALUE="" SIZE=20>
<BR><BR>
<INPUT TYPE=checkbox NAME="chkBox" CHECKED=True>
Display name in uppercase.
<BR><BR>
<INPUT TYPE=button NAME="cmdShow" VALUE="Show Greet ing">
</BODY>
</HTML>
10 marks for a complete set of coding else pro rata to a max of 10
(Total 20 marks)

NB
The First set of coding is purely HTML, whilst the second set of coding is
using VBSCRIPT.

© Institute for the Management of Information Systems –J.2010.

Page: 7 of 8
Reading references.

Main course text:


[1] Schneider, D I (2004)
An Introduction to Programming with Visual Basic 6.0 (4th Ed.)
Pearson Education. ISBN: 0131219189
[2] IMIS Resource materials

Question Learning Lecture/tutorial Reading references


number outcome etc.
1
a) & b) LO1, LO2 S1-6, L1 [1] Ch. 2 pp2-28
2
a) & b) LO3, LO5, L3, L11-12 [1] Ch. 2 pp32-40
LO7 T3-4 [1] Ch. 4 pp194-198
S7-12, S31-36
W11-12
3
a) & b) LO4 L4 [1] Ch. 2 pp32
[1] Ch. 3 p108
4
a), b) & c) LO8, LO15 L23-24, L39-40 [1] Ch. 1 pp19-20
W23-24, W36-37 [1] Ch. 11 pp516-554
S67-72, S112-
117
5
a), b) & c) LO7, LO9 L15-16, L25-26, [1] Ch. 5 pp225-249
W15-16, S43-48, [1] Appendix D pp785-794
S73-78
6
a), b) & c) LO10 L27-28, W27-28, [1] Ch. 8 pp414-434
S79-84
7
a), b) & c) LO12, LO13 L31-32, W29-30, [2] Programming & Web
S91-93 Applications (L31-32)
slides
8
a) & b) LO15 L37-38, L39-40 [1] Ch. 14 pp683-692
W34-35, W36-37 [2] Programming & Web
S106-111, S112- Applications (L39-40)
117 slides

© Institute for the Management of Information Systems –J.2010.

Page: 8 of 8

You might also like