KXC253SUPmarkingschemeWord文件下载.docx
- 文档编号:20684516
- 上传时间:2023-01-25
- 格式:DOCX
- 页数:23
- 大小:113.42KB
KXC253SUPmarkingschemeWord文件下载.docx
《KXC253SUPmarkingschemeWord文件下载.docx》由会员分享,可在线阅读,更多相关《KXC253SUPmarkingschemeWord文件下载.docx(23页珍藏版)》请在冰豆网上搜索。
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
Question4
Whichofthefollowingstatements,inrelationtothesequencediagram,iscorrect?
A)The$Use_Case_CreateNewClientrepresentsadifferentsectionofthesameapplication.
B)TheReceiveBooking_Viewisnotauserinterfacecomponent.
C)NoStageobjectsareinstantiated.
D)UserdetailsarestoredinaDatabase.
E)Amongstotherthings,aStagehasafloor.
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{
System.out.println(“Nursecomfortspatientfor”+time+“minutes.”);
publicvoidadministerMedicine(){
System.out.println(“Nurseadministers”+amount+“ofmedicine.”);
classDoctorextendsMedic{
publicDoctor(intt){
publicDoctor(intt,inta){
System.out.println(“Doctorcomfortspatientfor”+time+“minutes.”);
System.out.println(“Doctoradministers”+amount+“ofmedicine.”);
publicintdiagnose(){
System.out.println(“Doctordiagnosespatient.”);
returnamount;
//Theamountofmedicinediagnosedasrequired.
classOrderlyextendsHealthWorker{
System.out.println(“Orderlycomfortspatientfor”+time+“minutes.”);
Question5
Inthecodesegmentprovidedwhatoperationsareoverloaded?
A)comfortPatient()
B)diagnose()
C)comfortPatient()andadministerMedicine()
D)administerMedicine()
E)diagnose()andsetAmount()
Question6
Inthecodesegmentprovidedwhatoperationsareoverridden?
Question7
Ifthefollowingprogramsegmentisrun,whatwouldtheoutputbe?
publicstaticvoidmain(String[]args){
Orderlyo=newOrderly();
o=newMedic();
o.administerMedicine();
}
A)Doctoradministers5ofmedicine.
B)Doctoradministers26ofmedicine.
C)Medicadministers5ofmedicine.
D)HealthWorkeradministers5ofmedicine.
E)Noneoftheaboveasthereisasyntaxerror.
Question8
Nursen=newNurse();
fortPatient(14);
HealthWorkerh=newOrderly();
fortPatient(18);
Medicm=n;
h=m;
fortPatient();
A)Nursecomfortspatientfor18minutes.
B)Nursecomfortspatientfor14minutes.
C)Orderlycomfortspatientfor14minutes.
D)Orderlycomfortspatientfor18minutes.
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
select*fromevent;
name|location|eventDate
------------------------+--------------------+------------
Marathon|BeijingStreets|2008-08-26
100mRelay|AthleticsStadium|2008-08-21
Triathlon|AthleticsStadium|2008-08-23
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’);
Question10
Thedevelopersforgottoputacolumntorecordtheathletes’timesineachevent.WhichofthefollowingwilladdatimecolumntothecompeteIntable?
A)ALTERTABLEcompeteInADD(raceTimeDATE_TIME);
B)ALTERTABLEcompeteInADD(raceTimeDATETIME);
C)ALTERTABLEcompeteInINCLUDE(raceTimeDATETIME);
D)ALTERTABLEcompeteInINCLUDE(raceTimeDATE_TIME);
E)Noneoftheabove.
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.
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.
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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- KXC253SUPmarkingscheme
![提示](https://static.bdocx.com/images/bang_tan.gif)