I am not asking for my homework to be done for me but I have spent many hours trying to answer the below questions and have not got very far.
Please can someone help or advise me on how to answer these as I am studying an open university course and this is very important to me.
MethodwhereIsTheShelf(shelfNumAsInteger)AsString
outputAsString SetoutputTo "Thisshelfisinthe" SelectCaseshelfNum
Case1To 19:SetoutputTo output+"study"
Case19To 20:SetoutputTo output+"kitchen" Case21:SetoutputTo output+"bedroom"
Case23To 40:SetoutputTo output+"lounge" EndSelect
Returnoutput
EndMethod
(a) What stringwill be returned if theinput argument is 10?
(b) What stringwill be returned if theinput argument is 22? Briefly explainyour answer
(c)What stringwill be returned if theinput argument is 19?
Explainwhy thestringreturned will not containthe word ‘kitchen’,that is,explain whythe second case is not executed
d) What stringwill be returned if theinput argument is 41?
Bookmarks