SlideShare a Scribd company logo
1 of 3
Download to read offline
Family Name: _________________________ (As you are sorted in the university registration system)
Other Names: _________________________________________________
Student Number: ___________
SEG 2105
Introduction to Software Engineering
FINAL EXAMINATION –Sample
Time Allowed for Examination: Three hours
Professor: Timothy C. Lethbridge
Open book. (you may use books, personal notes etc., but no electronic devices)
Good luck!
SEG 2105 – Sample Final Examination Page 2 of 3
For the multiple choice questions, Circle the single best answer. There is only one best answer for each
multiple choice question. Part marks may be given for answers which are good but not the best.
Questions 1-5 are by default worth 2 marks each (total of 10 marks)
If you are unsure about an answer, mark it with ‘??’. In question 6 you will be asked to indicate which of
your answers you think you are most likely to have got wrong.
1. Which of the following patterns describes a precise way to write code?
a) Abstraction-occurrence
b) Delegation
c) Pipe-and-filter
d) Singleton
e) More than one of the above
2. In user interface design, the word ‘affordance’ means?
a) The set of tasks the user knows how to do
b) The set of features the customer has the money to pay for
c) The set of capabilities that a particular screen or dialog allows the user to do
d) The set of guidelines the user interface designer should follow in user-centered design
e) None of the above
3. Which of the following is true?
a) Most testing is done top-down
b) Big-bang testing is best because it gives results faster.
c) Most testing is done using a hybrid between top-down and bottom-up.
d) It is not worth doing bottom-up testing because it requires writing a lot of drivers.
e) Bottom-up testing means testing the user interface first.
4. Common coupling is named from:
a) The term used in Cobol for calling a procedure
b) Organizing all similar entities into one common location
c) The fact that it is the most frequent type of coupling
d) The term used in Fortran for global variables
e) An approach where the code is owned by everybody (i.e. ‘in common’)
5. Which of the following is not part of the software engineering code of ethics?
a) Participate in lifelong learning
b) Act consistently with the public interest
c) Maintain integrity and independence
d) Do what your management tells you to do
e) Be fair and supportive of colleagues
6. Indicate below the number of the single question from 1 to 5 that you think you are most likely to have got
wrong. If you did indeed get it wrong, you will not lose marks for that question. If you indicate more than
one number, then what you indicate will be ignored.
The single number of the question from 1-5 you think you are most likely got wrong is: _____
SEG 2105 – Sample Final Examination Page 3 of 3
Short answer:
7. (5 marks) Describe the reasons why it would not be a good idea to modify the code in a framework like
OCSF when you are using the framework in your application?
8. (5 marks) You are creating a method in Java that takes the string for a University of Ottawa course taught
in English (such as “SEG2105”) and returns the equivalent course taught in French (“SEG2505” in this
case). (4 is added to the second digit). The method throws an exception if the input isn’t a code for a course
taught in English. Describe a set of equivalence classes to test this system.
9. (5 marks) Draw a state machine that has the following States A, B, C and D. D is a superstate, where B
and C are its substates. A and C are default start states. Event e1 causes a transition from any state to A.
Event e2 causes a transition from C to D and vice-versa, and event e3 causes a transition from A to D.
10. (4 marks) In what kind of diagrams can a generalization triangle appear?
11. (3 marks) What techniques that we discussed in this course involve a moderator?
The following system description forms the basis for the remaining questions:
You are starting an outdoors services business. In the summer your employees will be mowing lawns and in
the winter they will be clearing snow. All year round they will be trimming trees.
Some employees can do all three tasks; however since trimming trees requires specialized training, not all
employees will be able to do it.
Customers will be signing contacts with your company for each of the tasks. For snow clearing you will be
charging $1 per square meter of snow cleared per visit, and for lawn mowing you will charge 5 cents per
square meter. You give a 50% discount for people willing to sign up for regular snow clearing or lawn
mowing for an entire season.
Each day you dispatch crews to do the required work. Employees have to sign out snow plow trucks, snow
blowers, shovels, lawn mowers and tree trimming kits. Tree trimming is always done in crews of two people;
snow clearing is always done individually.
ANSWER ALL OF THE FOLLOWING IN YOUR EXAM BOOKLET.
12. (14 marks) Create a class diagram for the above system
13. (4 marks) Write in OCL a constraint to say that if the work is tree trimming, then the crew size must be at
least 2.

More Related Content

Similar to Lo 16

May june 2010 scenario 4 [documentation]
May june 2010 scenario 4 [documentation]May june 2010 scenario 4 [documentation]
May june 2010 scenario 4 [documentation]owenchambers11
 
Scenario $4$
Scenario $4$Scenario $4$
Scenario $4$Jason121
 
June 2011 scenario 4
June 2011 scenario 4June 2011 scenario 4
June 2011 scenario 4alexwiggin
 
INF 103 Effective Communication/tutorialrank.com
 INF 103 Effective Communication/tutorialrank.com INF 103 Effective Communication/tutorialrank.com
INF 103 Effective Communication/tutorialrank.comjonhson291
 
June 2010 exam questions and answers
June 2010   exam questions and answersJune 2010   exam questions and answers
June 2010 exam questions and answersDamonTauroa
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Car removal gold coast
Car removal gold coastCar removal gold coast
Car removal gold coastanaferral
 
Exam – june 2010 – qp 11
Exam – june 2010 – qp 11Exam – june 2010 – qp 11
Exam – june 2010 – qp 11nic_vickers
 
INFA 640 Homework 2 Choose the best answer (one) and give re.docx
INFA 640 Homework 2 Choose the best answer (one) and give re.docxINFA 640 Homework 2 Choose the best answer (one) and give re.docx
INFA 640 Homework 2 Choose the best answer (one) and give re.docxjaggernaoma
 
Dat 565 dat565 dat 565 discussions uopstudy.com
Dat 565 dat565 dat 565 discussions  uopstudy.comDat 565 dat565 dat 565 discussions  uopstudy.com
Dat 565 dat565 dat 565 discussions uopstudy.comssuserd9bf9e
 
Dat 565 all discussions uop course guide uopstudy.com
Dat 565 all discussions uop course guide  uopstudy.comDat 565 all discussions uop course guide  uopstudy.com
Dat 565 all discussions uop course guide uopstudy.comssuserd9bf9e
 
Fin 351 all week homework assignment latest 2106 november
Fin 351 all week homework assignment latest 2106 novemberFin 351 all week homework assignment latest 2106 november
Fin 351 all week homework assignment latest 2106 novemberlenasour
 
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docxNew folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docxhenrymartin15260
 

Similar to Lo 16 (20)

May june 2010 scenario 4 [documentation]
May june 2010 scenario 4 [documentation]May june 2010 scenario 4 [documentation]
May june 2010 scenario 4 [documentation]
 
Scenario $4$
Scenario $4$Scenario $4$
Scenario $4$
 
Scenario 4
Scenario 4Scenario 4
Scenario 4
 
June 2011 scenario 4
June 2011 scenario 4June 2011 scenario 4
June 2011 scenario 4
 
INF 103 Effective Communication/tutorialrank.com
 INF 103 Effective Communication/tutorialrank.com INF 103 Effective Communication/tutorialrank.com
INF 103 Effective Communication/tutorialrank.com
 
June 2010 exam questions and answers
June 2010   exam questions and answersJune 2010   exam questions and answers
June 2010 exam questions and answers
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Car removal gold coast
Car removal gold coastCar removal gold coast
Car removal gold coast
 
Cets 2013_ gander hale_write_test_questions_session
Cets 2013_ gander hale_write_test_questions_sessionCets 2013_ gander hale_write_test_questions_session
Cets 2013_ gander hale_write_test_questions_session
 
Exam – june 2010 – qp 11
Exam – june 2010 – qp 11Exam – june 2010 – qp 11
Exam – june 2010 – qp 11
 
INFA 640 Homework 2 Choose the best answer (one) and give re.docx
INFA 640 Homework 2 Choose the best answer (one) and give re.docxINFA 640 Homework 2 Choose the best answer (one) and give re.docx
INFA 640 Homework 2 Choose the best answer (one) and give re.docx
 
Dat 565 dat565 dat 565 discussions uopstudy.com
Dat 565 dat565 dat 565 discussions  uopstudy.comDat 565 dat565 dat 565 discussions  uopstudy.com
Dat 565 dat565 dat 565 discussions uopstudy.com
 
Dat 565 all discussions uop course guide uopstudy.com
Dat 565 all discussions uop course guide  uopstudy.comDat 565 all discussions uop course guide  uopstudy.com
Dat 565 all discussions uop course guide uopstudy.com
 
Fin 351 all week homework assignment latest 2106 november
Fin 351 all week homework assignment latest 2106 novemberFin 351 all week homework assignment latest 2106 november
Fin 351 all week homework assignment latest 2106 november
 
Colloquium
ColloquiumColloquium
Colloquium
 
Tna Questionnaire
Tna QuestionnaireTna Questionnaire
Tna Questionnaire
 
Showcase 2
Showcase 2Showcase 2
Showcase 2
 
Scenario 4
Scenario 4Scenario 4
Scenario 4
 
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docxNew folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
 
IT 405
IT 405IT 405
IT 405
 

More from liankei (20)

Lo 19
Lo 19Lo 19
Lo 19
 
Lo 18
Lo 18Lo 18
Lo 18
 
Lo 13
Lo 13Lo 13
Lo 13
 
Lo 12
Lo 12Lo 12
Lo 12
 
Lo 11
Lo 11Lo 11
Lo 11
 
Lo 06
Lo 06Lo 06
Lo 06
 
Lo 05
Lo 05Lo 05
Lo 05
 
Lo 04
Lo 04Lo 04
Lo 04
 
Lo 01
Lo 01Lo 01
Lo 01
 
Lo 15
Lo 15Lo 15
Lo 15
 
Lo 09
Lo 09Lo 09
Lo 09
 
Lo 08
Lo 08Lo 08
Lo 08
 
Lo 03
Lo 03Lo 03
Lo 03
 
Lo 20
Lo 20Lo 20
Lo 20
 
Lo19
Lo19Lo19
Lo19
 
Lo20
Lo20Lo20
Lo20
 
Lo17
Lo17Lo17
Lo17
 
Lo18
Lo18Lo18
Lo18
 
Lo15
Lo15Lo15
Lo15
 
Lo16
Lo16Lo16
Lo16
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Lo 16

  • 1. Family Name: _________________________ (As you are sorted in the university registration system) Other Names: _________________________________________________ Student Number: ___________ SEG 2105 Introduction to Software Engineering FINAL EXAMINATION –Sample Time Allowed for Examination: Three hours Professor: Timothy C. Lethbridge Open book. (you may use books, personal notes etc., but no electronic devices) Good luck!
  • 2. SEG 2105 – Sample Final Examination Page 2 of 3 For the multiple choice questions, Circle the single best answer. There is only one best answer for each multiple choice question. Part marks may be given for answers which are good but not the best. Questions 1-5 are by default worth 2 marks each (total of 10 marks) If you are unsure about an answer, mark it with ‘??’. In question 6 you will be asked to indicate which of your answers you think you are most likely to have got wrong. 1. Which of the following patterns describes a precise way to write code? a) Abstraction-occurrence b) Delegation c) Pipe-and-filter d) Singleton e) More than one of the above 2. In user interface design, the word ‘affordance’ means? a) The set of tasks the user knows how to do b) The set of features the customer has the money to pay for c) The set of capabilities that a particular screen or dialog allows the user to do d) The set of guidelines the user interface designer should follow in user-centered design e) None of the above 3. Which of the following is true? a) Most testing is done top-down b) Big-bang testing is best because it gives results faster. c) Most testing is done using a hybrid between top-down and bottom-up. d) It is not worth doing bottom-up testing because it requires writing a lot of drivers. e) Bottom-up testing means testing the user interface first. 4. Common coupling is named from: a) The term used in Cobol for calling a procedure b) Organizing all similar entities into one common location c) The fact that it is the most frequent type of coupling d) The term used in Fortran for global variables e) An approach where the code is owned by everybody (i.e. ‘in common’) 5. Which of the following is not part of the software engineering code of ethics? a) Participate in lifelong learning b) Act consistently with the public interest c) Maintain integrity and independence d) Do what your management tells you to do e) Be fair and supportive of colleagues 6. Indicate below the number of the single question from 1 to 5 that you think you are most likely to have got wrong. If you did indeed get it wrong, you will not lose marks for that question. If you indicate more than one number, then what you indicate will be ignored. The single number of the question from 1-5 you think you are most likely got wrong is: _____
  • 3. SEG 2105 – Sample Final Examination Page 3 of 3 Short answer: 7. (5 marks) Describe the reasons why it would not be a good idea to modify the code in a framework like OCSF when you are using the framework in your application? 8. (5 marks) You are creating a method in Java that takes the string for a University of Ottawa course taught in English (such as “SEG2105”) and returns the equivalent course taught in French (“SEG2505” in this case). (4 is added to the second digit). The method throws an exception if the input isn’t a code for a course taught in English. Describe a set of equivalence classes to test this system. 9. (5 marks) Draw a state machine that has the following States A, B, C and D. D is a superstate, where B and C are its substates. A and C are default start states. Event e1 causes a transition from any state to A. Event e2 causes a transition from C to D and vice-versa, and event e3 causes a transition from A to D. 10. (4 marks) In what kind of diagrams can a generalization triangle appear? 11. (3 marks) What techniques that we discussed in this course involve a moderator? The following system description forms the basis for the remaining questions: You are starting an outdoors services business. In the summer your employees will be mowing lawns and in the winter they will be clearing snow. All year round they will be trimming trees. Some employees can do all three tasks; however since trimming trees requires specialized training, not all employees will be able to do it. Customers will be signing contacts with your company for each of the tasks. For snow clearing you will be charging $1 per square meter of snow cleared per visit, and for lawn mowing you will charge 5 cents per square meter. You give a 50% discount for people willing to sign up for regular snow clearing or lawn mowing for an entire season. Each day you dispatch crews to do the required work. Employees have to sign out snow plow trucks, snow blowers, shovels, lawn mowers and tree trimming kits. Tree trimming is always done in crews of two people; snow clearing is always done individually. ANSWER ALL OF THE FOLLOWING IN YOUR EXAM BOOKLET. 12. (14 marks) Create a class diagram for the above system 13. (4 marks) Write in OCL a constraint to say that if the work is tree trimming, then the crew size must be at least 2.