Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CP317 test 2 solutions, Lecture notes of Computer Science

covered the solutions in the test 2 from 2010

Typology: Lecture notes

2020/2021

Uploaded on 02/02/2023

JashanKaur
JashanKaur 🇨🇦

3 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CP317 Software Engineeri
ng
Fall2010
Student Name:
Student ID:
Instruction: This is a closed book exam
Duration: 1
hour
20 minutes
·Test 2
You get 2 points for filling out the Scantron card correctly. Write all the leading 0
(i
f any)
of
your ID number. Write your ID on both sides
of
the
ca
rd
.
Use
black lead pencil onl y, NOT pen, to
mark
the answer shee
c.
You get 2 points for marking all multiple choice answers on the answer sheet and on this
tesL
Mark
"A"
on the Test
Fo
rm column
The
multiple choice questions are worth 2 points eac
h·.
Do
not write in this table
Points
Max
Correct ID 2 2
Marking 0 2
answers
1-13
\V
26
14 2 10
15 1 10
16
q--
10
17
~
10
Total
~~
70
pf3
pf4
pf5
pf8

Partial preview of the text

Download CP317 test 2 solutions and more Lecture notes Computer Science in PDF only on Docsity!

CP317 Software Engineeri ng

Fall

Student Name:

Student ID:

Instruction: This is a closed book exam

Duration: 1 hour 20 minutes

· Test 2

  • You get 2 points for filling out the Scantron card correctly. Write all the leading 0 (i f any) of your ID number. Write your ID on both sides of the card.
  • Use black lead pencil only, NOT pen, to mark the answer shee c.
  • You get 2 points for marking all multiple choice answers on the answer sheet and on this tesL
  • Mark "A" on the Test Fo rm column
  • The multiple choice questions are worth 2 points eac h·.

Do not write in this table

Points Max

Correct ID

2

Marking

0

answers

1-13 (^) \V 26

2

1

q--

~

Total

~~

  1. Which of the fo llowing eliminates the organization's cost of using the BlackBerry Infrastructure? A. Direct TCP connections B. Wi-Fi conn ections

C. Serial Bypass

D. W AP connections

  1. The Main Event thre ad is created by A. the thread that executes the main ( ) method B. the thread that executes the Application. enterEventDispatcher () method C. the tlu·ead that ex ecutes the mainEvent () method D. the first thread that executes the run () method
  2. Wha t is the prefen ed method for ending thread execution? A. Using the stop ( ) method. B. Using code to end thread exec uti on. C. Using code to suspend a thread ind efinitely. D. Using the suspend ( ) method.
  3. The object is used to specify the type of GPS fix A. Crite ria B.LocationProvider C. Fix D. LocationListener
  4. The object Location gives data 'on A. coordinates B. direction C. speed D. A and B E. A, Ba nd C
  5. How accurate are autonomous GPS fixes? A. Within 3000 meters B. Within 300 meters C. Within 30 meters D. Within 3 meters
  6. The following type of GPS fixes has the highest po wer consumption A. autonomous B. assisted C. cellsite
  7. On which of the following are BlackBerry Maps included? · A All BlackBerry devices B. BlackBerry Device Software version 3.0 and later

C. BlackBerry D ev ice Software version 4.2 and later

D. BlackBerry D evice Software version 5.0 and later

The asset management system (the system) keeps track of a number of assets that can be borrowed; their availability, the current borrower (if any) and the asset history. The system interacts with three actors: o The administrator e nt ers new assets in the database, deletes obsolete ones, and updates any information related to assets. o The borrower searches for assets in the database to determine th eir availab il ity and borrows and returns assets. o The asset owner loans assets to borrowers through the system admi nistrator.

Assets are entered in the database when acquired, deleted from the database when disposed. The availability is updated whenever it is borrowed or returned. When a borrower fails to return an asse t on time, the asset management system sends a rem.inder to the borrower and informs the asset ow ner (by email.)

-A...us~n login tAe-&yStem-~rch...fGr~asset-iH-fer-mati.on-by-crsing<rny-asrerattri bute-:-A /

user can brows~ the asseLinformation by listing-alheferenceno assets sorted by a user specified ~a.

Aften::treeking that an asset is available, a bo11ower ea:n bmrow the asset. However, eacli use! tra

a-ereG:i:Wimit, if a user's us age is over his limit, he will-ha-ve-to settle hi s account in Stteh-a-way-

tliat his ammlHt owed is Hndg.J:-his limit hefor~e system uses the--emaiL I ~addJ:ess-te-ieeffi.i.f.-y-H'le-@ei'FeW~P, and-upclate ~any- info~;;rna.tion-G:g_t;oe..bor-tGW~l:.- A user can pl ace a hold on an asset currently being borrowed by another user. T he holds are sto red in a First In First Out queue. When the asset is returned, the system will inform by email the user with the highest priority in the hold queue that the asset is available.

Jf-t.R~-tte-date-ani·ves-w-ithouHhe-a.sseLbeing_ret.umed,_the_s_y..stem sends an email message to the

bGrrowedi-sting-all-the-assets that-a-re-past-e ue:-The-admi-A-i-s t:Fat-eHtl-w-seru:l-s-a~mai l to the

own erinf-et'ffli:R.g-.him-OLthe_dela y.

G^0 14. (10 points) Model the system by a Gane and Sarsen's data flow diagram.

0

\

I I v

~'V -~

u,.,d<A..R- t'SS~-

t>\

16. (10 ~oints) Draw a Petri net to model the Asset object.

17. (10 points) We need to write a module to implement th e bonowing function.

W h en the user requests to borrow an asset, the system will che ck if all the

requirements (usage a nd credit limits, etc.) are satisfied and will print a me ssage on

the screen with "Yes" meaning the asset can be borrowed, and "No" meaning th e

opposite.

The module will obviously be decomposed into sub-modules. Apply data flow

analysis to this problem, indicate in as much detail as you can , how the module can be

decomposed along the points of highest abstraction of input and output.

-,? ,f. \n X'v t- =- CbX\c\.nons ~ ~~