KXC253SUPmarkingscheme.docx

上传人:b****6 文档编号:7569623 上传时间:2023-01-25 格式:DOCX 页数:23 大小:113.42KB
下载 相关 举报
KXC253SUPmarkingscheme.docx_第1页
第1页 / 共23页
KXC253SUPmarkingscheme.docx_第2页
第2页 / 共23页
KXC253SUPmarkingscheme.docx_第3页
第3页 / 共23页
KXC253SUPmarkingscheme.docx_第4页
第4页 / 共23页
KXC253SUPmarkingscheme.docx_第5页
第5页 / 共23页
点击查看更多>>
下载资源
资源描述

KXC253SUPmarkingscheme.docx

《KXC253SUPmarkingscheme.docx》由会员分享,可在线阅读,更多相关《KXC253SUPmarkingscheme.docx(23页珍藏版)》请在冰豆网上搜索。

KXC253SUPmarkingscheme.docx

KXC253SUPmarkingscheme

Pages:

10

Questions:

15

 

THEUNIVERSITYOFTASMANIA

SUPPLEMENTARYANDDEFERREDORDINARY

EXAMINATIONSFORDEGREESANDDIPLOMAS

June2005

 

KXC253SoftwareDesign

Examiner:

MrR.P.Dazeley

 

TimeAllowed:

THREE(3)hours

 

Instructions:

Attemptallquestions.AnswerallthequestionsinsectionAandsectionB.ThereareTwo

(2)sections.QuestionsinsectionAareworth5markseach.QuestionsinsectionBareworth40markseach.Allocateyourtimeappropriatelytothesections.

Nomaterialorequipmentmaybetakenintotheexamination.

SectionA:

MultipleChoice

ThereareTwelve(12)questionsinthissection.Attemptallquestionsfromthissection.Answerallthequestionsonasinglepageinyouranswerbooklet.Eachquestionisworth5marks.

Usethefollowingsequencediagramtoanswerquestions1–4

Thisisbasedontheideaofacompanythatownssomeparklandwithanumberofattractions.Someofthoseattractionsconsistofanumberofsmalloutdoorstages,setupforpublictheatreperformances.Thesequencediagrambelow,detailstheprocessforbookingoneofthesestages.

Question1

Accordingtothesequencediagram$Use_Case_CreateNewClientisamemberofwhichpackage?

A)Client_PKG.

B)RecieveBooking_View.

C)View_PKG.

D)$Use_Case_CreateNewClient_PKG

E)$Use_Case_CreateNewClientisnotamemberofanypackage.

[5marks]

Question2

AccordingtothesequencediagramhowmanyoperationsdoestheStageclasshave?

A)1

B)3

C)5

D)6

E)7

[5marks]

Question3

AccordingtothesequencediagramhowmanyobjectsareinstantiatedbytheReceiveBooking_Viewconstructor?

A)0

B)1

C)2

D)3

E)4

[5marks]

 

Question4

Whichofthefollowingstatements,inrelationtothesequencediagram,iscorrect?

A)The$Use_Case_CreateNewClientrepresentsadifferentsectionofthesameapplication.

B)TheReceiveBooking_Viewisnotauserinterfacecomponent.

C)NoStageobjectsareinstantiated.

D)UserdetailsarestoredinaDatabase.

E)Amongstotherthings,aStagehasafloor.

[5marks]

Usethefollowingcodetoanswerquestions5-8

packageHealth;

 

abstractclassHealthWorker{

protectedinttime;

publicHealthWorker(){

time=0;

}

publicvoidcomfortPatient(){

System.out.println(“HealthWorkercomfortspatientfor”+time+“minutes.”);

}

publicvoidcomfortPatient(intt){

time=t;

}

}

 

classMedicextendsHealthWorker{

protectedintamount;

publicMedic(){

amount=0;

}

publicvoidadministerMedicine();

publicvoidsetAmount(inta){

amount=a;

}

}

 

classNurseextendsMedic{

publicvoidcomfortPatient(){

System.out.println(“Nursecomfortspatientfor”+time+“minutes.”);

}

publicvoidadministerMedicine(){

System.out.println(“Nurseadministers”+amount+“ofmedicine.”);

}

}

 

classDoctorextendsMedic{

publicDoctor(intt){

time=t;

}

publicDoctor(intt,inta){

time=t;

amount=a;

}

publicvoidcomfortPatient(){

System.out.println(“Doctorcomfortspatientfor”+time+“minutes.”);

}

publicvoidadministerMedicine(){

System.out.println(“Doctoradministers”+amount+“ofmedicine.”);

}

publicintdiagnose(){

System.out.println(“Doctordiagnosespatient.”);

returnamount;//Theamountofmedicinediagnosedasrequired.

}

}

 

classOrderlyextendsHealthWorker{

publicvoidcomfortPatient(){

System.out.println(“Orderlycomfortspatientfor”+time+“minutes.”);

}

}

Question5

Inthecodesegmentprovidedwhatoperationsareoverloaded?

A)comfortPatient()

B)diagnose()

C)comfortPatient()andadministerMedicine()

D)administerMedicine()

E)diagnose()andsetAmount()

[5marks]

Question6

Inthecodesegmentprovidedwhatoperationsareoverridden?

A)comfortPatient()

B)diagnose()

C)comfortPatient()andadministerMedicine()

D)administerMedicine()

E)diagnose()andsetAmount()

[5marks]

Question7

Ifthefollowingprogramsegmentisrun,whatwouldtheoutputbe?

publicstaticvoidmain(String[]args){

Orderlyo=newOrderly();

o=newMedic();

o.administerMedicine();

}

A)Doctoradministers5ofmedicine.

B)Doctoradministers26ofmedicine.

C)Medicadministers5ofmedicine.

D)HealthWorkeradministers5ofmedicine.

E)Noneoftheaboveasthereisasyntaxerror.

[5marks]

Question8

Ifthefollowingprogramsegmentisrun,whatwouldtheoutputbe?

publicstaticvoidmain(String[]args){

Nursen=newNurse();

fortPatient(14);

HealthWorkerh=newOrderly();

fortPatient(18);

Medicm=n;

h=m;

fortPatient();

}

A)Nursecomfortspatientfor18minutes.

B)Nursecomfortspatientfor14minutes.

C)Orderlycomfortspatientfor14minutes.

D)Orderlycomfortspatientfor18minutes.

E)Noneoftheaboveasthereisasyntaxerror.

[5marks]

Usethefollowingdatabasetablesanddatatoanswerquestions9-12

CREATETABLEcompetitor(

idsmallintprimarykey,

namevarchar(30),

dobdate,

countryvarchar(100)

);

CREATETABLEevent(

namevarchar(100)primarykey,

locationvarchar(100),

eventDatedate

);

CREATETABLEcompeteIn(

competitor_idsmallint,

event_namevarchar(100),

placesmallintDEFAULT0

);

 

ALTERTABLEcompeteInADDCONSTRAINTFK_competitor_competingIn

FOREIGNKEY(competitor_id)REFERENCEScompetitor(id);

ALTERTABLEcompeteInADDCONSTRAINTFK_competingIn_event

FOREIGNKEY(event_name)REFERENCESevent(name);

ALTERTABLEcompeteInADDCONSTRAINTPK_competeInPRIMARY

KEY(competitor_id,event_name);

 

SQL>select*fromcompetitor;

id|name|dob|country

----+-----------------+------------+-----------------

1|JohnSmith|1983-01-24|Australia

2|AndreaJones|1984-11-01|England

3|ScottCopperman|1979-03-27|USA

4|SarahWilliams|1984-09-05|Canada

 

SQL>select*fromevent;

name|location|eventDate

------------------------+--------------------+------------

Marathon|BeijingStreets|2008-08-26

100mRelay|AthleticsStadium|2008-08-21

Triathlon|AthleticsStadium|2008-08-23

 

SQL>select*fromcompeteIn;

competitor_id|event_name|place

---------------+-------------------------+-------

1|Triathlon|2

1|Marathon|0

2|100mRelay|1

3|Marathon|0

3|Triathlon|1

3|100mRelay|2

4|100mRelay|3

Question9

Whichquerywillgivealistofallthecompetitorsthatareparticipatinginthe“Triathlon”event?

A)SELECT*FROMcompetitorWHEREevent_name=‘Triathlon’;

B)SELECT*FROMcompetitorhavingid=(selectcompetitor_idFROMcompeteInWHEREevent_name=‘Triathlon’);

C)SELECT*FROMcompetitorWHEREid=(selectcompetitor_idFROMcompeteInWHEREevent_name=‘Triathlon’);

D)SELECT*FROMcompetitorwhereidin(selectcompetitor_idFROMcompeteInWHEREevent_name=‘Triathlon’);

E)SELECT*FROMcompetitorhavingidin(selectcompetitor_idFROMcompeteInWHEREevent_name=‘Triathlon’);

[5marks]

Question10

Thedevelopersforgottoputacolumntorecordtheathletes’timesineachevent.WhichofthefollowingwilladdatimecolumntothecompeteIntable?

A)ALTERTABLEcompeteInADD(raceTimeDATE_TIME);

B)ALTERTABLEcompeteInADD(raceTimeDATETIME);

C)ALTERTABLEcompeteInINCLUDE(raceTimeDATETIME);

D)ALTERTABLEcompeteInINCLUDE(raceTimeDATE_TIME);

E)Noneoftheabove.

[5marks]

Question11

WhichofthefollowingstatementswilladdSarahWilliamstothelistofcompetitorsinthe“Marathon”withathirdplace?

A)INSERTcompeteInVALUES(4,‘Marathon’,3);

B)INSERTINTOcompeteInVALUES(‘SarahWilliams’,‘Marathon’,3);

C)INSERTINTOcompeteInVALUES(4,‘Marathon’,3);

D)INSERTcompeteInVALUES(‘SarahWilliams’,‘Marathon’,3);

E)Alloftheabove,it’samatterofpersonalpreference.

[5marks]

Question12

Whatdoesthefollowingquerydo:

CREATETABLEquestion12asSELECTcompetitor.nameascp_name,event.nameasev_name,event.locationFROMcompetitor,event,competeInHAVINGcompetitor.id=competeIpetitor_idANDevent.name=competeIn.event_name;

A)Createsatableshowingwhicheventsandlocationseachcompetitorhasalreadycompetedin.

B)Createsatableshowingwhicheventsandlocationseachcompetitormustattend.

C)Createsatablelistingallthecompetitors,eventsandlocationsnumbers.

D)Createsatableidentifyingwhichcountrieshaveacompetitorcompetinginwhicheventsandwheretheseeventsarelocated.

E)Nothing-ithasasyntaxerror.

[5marks]

SectionB

ThereareThree(3)questionsinthissection.AttemptALLquestions.Writeyouranswersforeachquestioninaseparatebooklet.Eachquestionisworth40marks.

Question13

a.Answerthefollowing:

i)Identifythethree(3)typesofrelationshipusedinUMLdesign.

ii)Provideabriefdescriptionofeachofthethree(3)relationships.

iii)DrawaUMLdiagramtoillustrateeachofthethree(3)relationships.

iv)BrieflydescribehoweachrelationshipisimplementedinJava.

[15marks]

MarkingScheme:

I.1markforeachtypeofrelationshipidentified.(inheritance,uses(orassociation),aggregation)

II.1markforeachrelationshipdescription

Inheritance–needtosaysubclass‘isakindof’parentclass–orwordstothateffect.

Aggregation–needtosaythattheSuperSetclass‘ismadeupof’SubSetclasses-orwordstothateffect(iftheyonlysaySuperclassandsubclassthentheyarewrongandshouldget0marks)

Uses(association)–needtosaythereisarelationshipbetweenthetwoclasses–oneneedstheother-orwordstothateffect.

III.1markforeachcorrectlydrawnrelationship.

IV.2markforeachrelationshipdescription

Implementingaggregation,mustmentioncreatinga

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 求职职场 > 面试

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1