2000 paper - Monash University

advertisement
Name: ___________________
Student Number: ___________
Monash University
School of Computer Science & Software Engineering
Exam Paper
COT2030 - Input Output Technology
Semester 1, 2000
Time allowed: 110 minutes for working
10 minutes for reading
Instructions to candidates
This paper consists of TWO sections. Please check that all pages are present before
commencing.
Answers for SECTION A must be indicated on the question pages. The answers to SECTION
B must be in the space provided in the examination booklet.
Answer all questions in SECTIONS A and B.
This exam is worth 50 marks. Section A is worth 5 marks. Section B is worth 45 marks.
You must include your name and student ID number in the spaces provided at the top of the
first page in the examination booklet.
Calculators are permitted.
Examination booklets must NOT be removed from the exam.
1 of 9
Part A multiple choice 5 questions, 1 minute each, 5 minutes.
Question 1. To be most effective in detecting transpositional errors, check digits should be
calculated using
(a) Modulo 43 instead of Modulo 11
(b) Use positional weights before calculating the modulo value
(c) Numeric codes only; it cannot be applied to alphanumeric codes
(d) Code 39 barcodes; it does not apply to UPC barcodes
Question 2. Which of the following statements is NOT true about event handlers in
JavaScript.
a) They can be included with the input tags.
b) They can be included with the form tag.
c) Can be associated with end of file processing for a database application.
d) Are generally used to call functions when triggered.
Question 3 Which is not part of the WinCE Object Store
a) The Registry
b) The Application Heap
c) The Database
d) The File System
Question 4. Which of the following is true with regard to Active Server Pages (ASP)
a) ASP is dependent on the capabilities of the client browser
b) ASP and Javascript are processed in the same way on the WEB server
c) ASP can use Visual Basic script as well HTML to code pages
d) ASP can be used on any WEB server platform
Question 5. A 256 colour bit map file (bmp) is 200 by 320 pixels. How large is the file?
a) (200 * 320 * 8)/ 8 = 64000 bytes
b) 200 * 320 * 8 = 512000 bytes
c) 320 * 320 = 102400 pixels
d) 200 * 320 = 64000 bytes
2 of 9
Part B short answer, write your answers in the space provided.
Question 1
(a) A builders hardware and timber yard wants to improve its efficiency of computer data
entry by introducing product barcodes. Products already have existing alphanumeric product
codes and the idea is to simply code this number as a barcode. Which of the UPC,EAN,25 or
39 system would you recommend and why ? What steps would you take when evaluating
barcode scanning equipment?
__________________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________ (3marks)
(b) Discuss 3 types of error checks that may be used to validate data input. Give examples in
your answer
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________ (3marks)
3 of 9
Question 2
Source data entry via the web.
(a) Consider the following fragment of HTML. What is wrong with it? How might it be
fixed?
…
<form …>
<input type = text >
<input type = select name = personType>
<option>Student
<option>Lecturer
<option>Tutor
</select>
</form>
<input type = hidden name = AAscript value = script3>
…
__________________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(4marks)
4 of 9
(b) Your first assignment dealt with data entry over the web. Discuss the process used from
the point of:
What process(s) run on the client
What process(s) run on the server
How the server knows which program to call
How dynamic HTML is generated to send back to the client.
This should be answered in terms of a Unix environment as well as a Windows NT
environment.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________ (8 marks)
5 of 9
Question 3.
(a) Explain the interaction between an ‘interrupt handler’ and a device driver in dealing with
an interrupt. Use the keyboard as an example.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
(b) You have installed a CDROM and sound card in your computer but there is an interrupt
conflict problem with another device in your system. What does this mean and how would
you fix it?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
(c) A disk is single interleaved. It has eight sectors of 512 bytes per track , and a rotation rate
of 500 rpm. How long does it take to read all the sectors of a track in order, assuming the arm
is already correctly positioned, and 1/2 a rotation is needed to get sector 0 under the head ?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
6 of 9
Question 4.
Find the binary Huffman codes for a source which has the following probabilities :
A
B
C
D
0.35 0.2
0.15 0.3
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
Question 5
(a) Define the characteristics of an operating system built for mobile devices or embedded
systems?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
(b) What are the major design issues when developing applications on a mobile device?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
7 of 9
Question 6.
Pictures stored in jpeg format are coded with a lossy compression system. The degree of loss
can be chosen pixels (or groups of them) are modified if their pixel value is near enough to
that of adjacent pixels. Pictures stored in gif format are (roughly speaking) lempel-ziff (zip)
encoded raw bit map (bmp) files.
Why is jpeg better than gif for compression of colour pictures and gif better than jpeg for high
contrast black and white pictures?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
Question 7.
Given the following section of Active Server Page code:
<HTML>
<HEAD>
<TITLE> First page</TITLE>
</HEAD>
<BODY BGCOLOR=#ffffff>
<H1>Active Server Page One</1>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "accdbconn"
mysqlstr = "SELECT * FROM TableA where name like '" & request("search") &
"%' ORDER BY name"
Set rsAuthor = Conn.Execute(mysqlstr)
If rsauthor.EOF Then
Response.Write "Sorry, no records in the database!"
Else
%>
<TABLE CELLSPACING=10 BORDER=1>
<TR><TH>Author</TH><TH>Year born</TH><TH>Au_id</TH></TR>
<%
While Not rsauthor.EOF
Response.Write "<TR><TD>" & rsauthor.Fields.Item("name").Value & "</TD>"
Response.Write "<TD>" & rsauthor("Year born").Value & "</TD>"
Response.Write "<TD>" & rsauthor("US_id") & "</TD>"
rsauthor.MoveNext
Wend
Response.Write "</TABLE>"
End If
%>
</BODY>
8 of 9
(a) Explain what the code is doing in general.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
(b) What amendments would you make to the code to accept user input from a combo box.
_________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
___________________________________________________________(3marks)
9 of 9
Download