IS203 – Software Engineering Name (as on Student Card): IS203 Software Engineering INSTRUCTIONS TO CANDIDATES (Please read this page only. Do not open the paper until instructed) 1. This is a close-book examination. Please remove everything from your workspace except for pens, pencils, erasers, wipe outs and stapler before you begin. (No calculators) 2. The time allowed for this examination paper is 3 hours. 3. This paper contains total of 27 pages. 4. This examination consists of 2 parts. a. Section A consists of 10 multiple choice questions (MCQ). Each MCQ is worth 2 marks. For each question, select one or MORE choices. All correct choices must be selected to be awarded 2 marks. 1 mark if 50% or more of the correct choices are ticked. 0 marks if ANY wrong answer is ticked. CLEARLY mark each correct choice with a TICK beside it. For example, [ ] A. SE is fun! b. Section B consists of 4 questions. Each question is worth 20 marks. 5. All answers must be filled on this exam sheet. NO extra paper will be provided. 6. You must return all parts of this exam paper, properly stapled to the instructors. Missing exam paper or parts thereof will be considered cheating. Good Luck! Marks Section A (MCQ): 20 Section B (Short Qns) 10 Section C (Q 1): 20 Section C (Q 2): 20 Section C (Q 3): 20 Section C (Q 4): 10 TOTAL 100 IS203/2008-091/684088566 Awarded Page 1 of 27 IS203 – Software Engineering Section A [2 Marks Each] 1. Jimmy and Tommy are working on a local copy of the same file (lala.txt) managed by Git. The following error is encountered when Jimmy tries to push to Git after a successful Git commit. git.exe push --progress "origin" master:master To [email protected]:is203/G9T9.git ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:is203-scratch/G9T9.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. git did not exit cleanly (exit code 1) (874 ms @ 26/11/2015 12:45:20 PM) What should Jimmy do? [ [ [ [ [ ] ] ] ] ] A. B. C. D. E Jimmy should pass the file to Tommy using a thumb drive. Jimmy should delete his local copy and lose all his changes. Jimmy should do a Git pull, resolve any conflicts in the file, and Git push. Tommy should do a Git commit and Git push. Tommy should do a Git pull and resolve any conflicts in the file. 2. The team discovers that they are behind schedule halfway through an iteration. The project’s deadline is 6 month away. Which of the following is a possible action to be taken by the team? [ [ ] A. ] B. [ [ [ ] C. ] D. ] E Push some features scheduled in this iteration to the next iteration. Push integration and regression testing for the current iteration to the next iteration. Ask the team to work overtime. Add more people to the team. Pray harder and hope that they are able to finish on time. IS203/2008-091/684088566 Page 2 of 27 IS203 – Software Engineering 3. Which of the following is an advantage of using a web application framework (Struts, Spring etc)? [ [ ] A. ] B. [ [ [ ] C. ] D. ] E Provides most of the common functionality. Avoid rewriting and revalidating common solutions to recurring problems. Easy to learn. Increases code complexity. Gives you bragging rights over your peers. 4. When using GQM (Goal-Question-Metric), you must do the following: [ [ [ [ ] ] ] ] A. B. C. D. [ ] E Be able to accurately measure the required metric. Use complicated metrics as they are more effective than simple metrics. Ensure that each question is mapped to one and only one metric. Create a clear and actionable mitigation plan based on cut-off values provided by the metric. Use the metric to determine the overall best person in the group. 5. Good pair programming practices include the following: [ ] A. [ ] B. [ ] C. [ ] D. [ ] E Rotating the people assigned to the pairs every now and then to maximize learning. Making sure the weaker programmers pair with each other to avoid slowing down the team. Creating pairs "on-demand" to maximize flexibility and scheduling capabilities. Ensuring that the driver's role is solely to type in the code specified by the observer. Rotating the driver and observer roles frequently. 6. Andrew tries to run his JEE web application (Apache Tomcat + MySQL) from NetBeans IDE. Unfortunately the following error is reported: “java.lang.NoClassDefFoundError: Could not initialize class is203.dao.ConnectionManager”. Which of the following BEST describe the reason(s) behind the error? [ [ [ [ [ ] ] ] ] ] A. B. C. D. E Java Development Kit (JDK) is installed. Apache Tomcat is not installed. MySQL database is not installed. ConnectionManager.java is missing. None of the above. 7. Which of the following BEST describe the difference(s) between Java Server Pages (JSP) and Java Servlets: [ ] A. A Servlet requires a Java Virtual Machine (JVM) while a JSP is executed by the browser. IS203/2008-091/684088566 Page 3 of 27 IS203 – Software Engineering [ [ [ [ ] ] ] ] B. C. D. E A Servlet is internally compiled into a JSP. A JSP but not a Servlet can have the same content as an HTML page. A Servlet is not compiled by Tomcat 6.0 automatically, but JSP pages are. All the above except B. 8. Consider the following two JSP pages located in the same directory. <% int x = 0;%> <jsp:include page="a.jsp"/> <% x = x+1 %> b.jsp a.jsp Is there an error(s) in the JSP pages? If there is/are, which of the following best describes the error(s) (if any)? [ ] A. The files should be renamed to a.JSP and b.JSP respectively. [ ] B. The second line in b.jsp should be <%= x = x+1 %> [ ] C. There is no bug. The above two jsp pages are correct. [ ] D. The <jsp:include> should be replaced with an include directive. [ ] E There is still a bug(s) which is not listed in the previous options. 9. Which of the following will result in a conflict that TortoiseGit can merge and resolve automatically without manual intervention: [ ] A. Jim edits lines 10 to 15 of apple.txt. Tom edits lines 24 to 35 of apple.txt. [ ] B. Jim edits lines 40 to 47 of apple.txt. Tom edits lines 28 to 39 of apple.txt. [ ] C. Jim edits lines 40 to 47 of apple.txt. Tom edits lines 46 to 59 of apple.txt. [ ] D. Jim edits lines 54 to 57 of pear.txt. Tom edits lines 49 to 53 of papaya.txt. [ ] E Jim edits line 2 to 5 of mango.txt Tom deletes mango.txt 10. Given the schedule below, which of the following tasks are on the critical path? Task T1. Design UC "Add Student" T2. Design UC "Register Course" T3. Design Review T4. Code UC "Add Student" T5. Code UC "Register Course" T6. Testing and Debugging [ ] A. Pre-requsite Nil Nil T1, T2 T3 T3 T4, T5 Start 1-Sep 1-Sep 5-Sep 6-Sep 6-Sep 10-Sep End 4-Sep 4-Sep 5-Sep 8-Sep 9-Sep 10-Sep Duration (days) 4 4 1 3 4 1 T1. Design UC "Add Student" IS203/2008-091/684088566 Page 4 of 27 IS203 – Software Engineering [ [ [ [ ] ] ] ] B. C. D. E T2. Design UC "Register Course" T3. Design Review T4. Code UC "Add Student" T5. Code UC "Register Course" IS203/2008-091/684088566 Page 5 of 27 IS203 – Software Engineering Section B [2 Marks Each] 1. At the end of every iteration, we do ___________ testing to ensure features completed in __________ iteration(s) are bug free. 2. Task metrics (TM), as defined in the lecture slides, is a good metric for project that does ____________-boxing and it is tracked per _____________ basis. 3. The critical path is the ___________ amount of time to complete a project. If _________ task on the critical path delays, the project delays. 4. The Rational Unified Process says that software development process follows 4 phases namely (1) ____________________, (2) ____________________, (3) ____________________, and (4) ____________________. 5. Pair programming means two people are physically present using one laptop. One person types on the keyboard and this person is called the ______________. The other person, called the _____________, designs and tells the first person what to code. IS203/2008-091/684088566 Page 6 of 27 IS203 – Software Engineering Section C [20 Marks Each] 1. A software firm, Fiasco!, is tasked to develop and implement a Donor Management System (DMS) by the blood bank of the country. The team in Fiasco! uses RUP to manage the project. To ensure quality delivery of the project, the project manager has decided to use a Software Quality Metric as follows: Goal: To create high quality software Question: How many bugs do we have? Metric: Number of bugs reported per iteration. Use: Condition if bug count <= 5 if bug count > 5 AND <=10 Course of action Action 1: Do nothing Action 2: Re-schedule project to add in another day for testing Action 3: Re-schedule project to add in more time in every iteration for testing if bug count > 10 Current tracking: End of Iteration Number of bugs 1 5 2 3 3 15 4 7 5 10 6 4 Actions Do nothing Do nothing Re-schedule project to add in more time in every iteration for testing Re-schedule project to add in another day for testing Re-schedule project to add in more time in every iteration for testing Do nothing Given this scenario, answer the following questions: I. The metric above can be improved. State TWO specific things that are wrong with this metric. Explain in two sentences or less why each thing is wrong. Note: Your answer can include the metric itself, the mitigation plan, and the collected data. [4 marks] IS203/2008-091/684088566 Page 7 of 27 IS203 – Software Engineering II. Give TWO suggestions of how we can improve this metric. For each suggestion, explain clearly in two sentences or less why it improves the metric. [4 marks] After a few weeks, Fiasco!'s project manager decides to use an additional schedule metric to further improve the tracking of the project. III. What is ONE specific metric that can be used to track his schedule? Note: This must be a formula that is easily computable. Make clear what you are using as components of your metric. [3 marks] IS203/2008-091/684088566 Page 8 of 27 IS203 – Software Engineering IV. Give TWO different suggestions for when the PM should update and check the schedule metric to determine if corrective action needs to be performed. For each suggestion, list ONE advantage and ONE disadvantage of the suggestion. Be very specific in your answers. [6 marks] V. Please list three cutoff values for the schedule metric (specified in III.) along with the corrective actions to be taken for each cutoff value. [3 marks] IS203/2008-091/684088566 Page 9 of 27 IS203 – Software Engineering 2. Infinity, a system integration company has been awarded a contract to develop Group Get-together system (GG) for the Software Engineering teaching team. The project will begin work on November 3. Functional Requirements: 1. The GG system should automate the creation of Git repositories for Software Engineering student groups. Each group has 5 pre-assigned students who are taking the course. 2. The GG system should allow each student in a team to peer evaluate all other members in the team. The consolidated scores will be released to each individual team. 3. The GG system should allow each student in a team to submit their own timetable and generate a consolidated team timetable. This will be used by the team and the supervisors to determine the meeting time for the supervisor's meeting. 4. The GG system allows the instructors to upload a CSV file with the following columns a. Name of Student b. Student ID c. Team name Other Requirements 1. User-friendly and effective web-based user interface 2. The project must be finished in three months (i.e. end March). 3. The application must run on Tomcat & MySQL on Amazon Web Services cloud platform. 4. The teaching team advocates agile processes. They have requested Infinity to show them a working build at the end of every month. Resources Infinity has assessed the staff resources required by the project. The following project team has been formed: 1. Kevin is a project manager who has successfully managed web application development projects at Infinity for the last three years using Infinity Delivery Methods (IDM). The methodology is a typical waterfall process where customers have to do a sign-off on the requirements, before moving on to design and implementation. 2. Jayson is an experienced Web page designer and HTML programmer. 3. Two Java programmers (Jaclyn & Clamen) are fresh computer science graduates and were recently hired by Infinity. This is their first project but they have been exposed to web development using JSP and Servlets in one of their previous modules. The development team will develop using Tomcat & MySQL on a windows laptop. They have a windows Server 2008 computer that they will use as an integration box. IS203/2008-091/684088566 Page 10 of 27 IS203 – Software Engineering 1 1.1 1.2 1.3 2 2.1 2.2 3 3.1 4 4.1 5 5.1 6 6.1 6.2 7 7.1 7.2 7.3 Iteration 1 Elicit Requirements Produce Software Requirements Specification (SRS) Hold Review with the Customer Iteration 2 Develop Use Case Realizations Develop Sequence Diagrams Iteration 3 Backend - GIT Repository Scripts Iteration 4 Entity classes - Code Timetable generator Iteration 5 Entity classes - Code Peer evaluation Iteration 6 Develop User Interface Integrate all User Interface with functionalities developed and writing controllers Iteration 7 Deployment to staging server User Acceptance Test Deployment to production server Resource Duration Start Date End Date ALL ALL 10 days 2 days 3 Nov 2008 17 Nov 2008 14 Nov 2008 18 Nov 2008 ALL ALL ALL ALL 1 day 19 Nov 2008 19 Nov 2008 12 days 10 days 20 Nov 2008 8 Dec 2008 5 Dec 2008 19 Dec 2008 ALL 10 days 22 Dec 2008 2 Jan 2009 ALL 10 days 5 Jan 2009 16 Jan 2009 ALL 10 days 19 Jan 2009 30 Jan 2009 ALL ALL 5 days 3 days 2 Feb 2009 9 Feb 2009 6 Feb 2009 11 Feb 2009 ALL ALL ALL 2 days 10 days 1 days 12 Feb 2009 16 Feb 2009 2 Mar 2009 13 Feb 2009 27 Feb 2009 2 Mar 2009 Note: Duration excludes Saturday and Sunday. Public holidays are considered as working days. Given this scenario, answer the following questions: I. Kevin is going to use the schedule to track progress. State TWO issues that he will face using this schedule. For each issue, explain in 2 sentences or less how it will hinder his tracking of the schedule. [4 marks] IS203/2008-091/684088566 Page 11 of 27 IS203 – Software Engineering II. Kevin presented the schedule to James, the project director. James commented that "This is absolutely crap. You are doing a waterfall process for a client who has requested for an iterative process". Who do you think is right? Justify your answer in less than thirty words. [4 marks] III. State TWO reasonable and relevant risks (unrelated to schedule) for this project. For each risk, explain why it is a risk in not more than 2 sentences. [4 marks] IS203/2008-091/684088566 Page 12 of 27 IS203 – Software Engineering IV. State TWO things that can possibly go wrong when the team deploys the application to the production server (Amazon Web Services cloud platform). State what the team can do during development to reduce/eliminate each of the problems. [4 marks] V. The schedule has an iteration (Iteration 6) that involves developing and integrating the user interface with the backend codes (i.e. entity classes). Is this a good/bad strategy? Justify your answer in 5 sentences or less. [4 marks] IS203/2008-091/684088566 Page 13 of 27 IS203 – Software Engineering 3. Use JSP to build a web portal for a simple point-of-sale application of a grocery store. The grocery store only sells 3 items: apples, oranges, and grapes. The prices of apples, oranges, and grapes are $2, $2.20 and $2.30 per kilogram respectively. In order to increase sales, the shop gives two types of discounts to customers: regular and privileged. The business logic for the regular discount is as follows. If a customer buys more than 5 kilograms of apples, there is a 5% discount to the price of apples bought. Similarly if one buys more than 5 kilograms of oranges, there is a 6% discount to the price of oranges bought. Finally, there is a 7% discount to the price of grapes if one buys more than 5 kilograms of grapes. Aside from regular discount outlined above, there is also a privileged discount. The shop assigns discount codes for special customers. There are three different codes: AAA, BBB, and CCC. For each, the discount rate is 5%, 10%, and 25% respectively. These rates are with respect to the total price of fruits purchased, no matter how much is purchased. If no discount code is provided, no privileged discount is given. The actual discount given to a customer is the maximum of the two discounts (in $), i.e., if the regular discount is larger than the privileged discount, the regular discount is given; otherwise, the privileged discount is given. The flow of the application is as follows: Click “Process Order” Button Point-of-Sale Page (point_of_sale.jsp) <<redirect / forward>> Order Processing Page (process_order.jsp) Display Price Page (display_price.jsp) The point_of_sale.jsp page allows users to quickly enter a customer purchase order. A snapshot of the simple user interface is shown below. Users first check the item(s) they want to purchase and enter the corresponding quantity. If the checkbox is not checked, whatever amount is written in the corresponding “Quantity” textbox is ignored by the system. Users can also enter a privileged code if they have one. The screenshot below is a sample of the Point-of-Sale Page (point_of_sale.jsp). IS203/2008-091/684088566 Page 14 of 27 IS203 – Software Engineering After a user purchase is entered and the “Process Order” button is pressed, relevant information will be passed to process_order.jsp which then computes the price that a user must pay before and after discount. Finally process_order.jsp page passes relevant information to display_price.jsp. The page display_price.jsp in turn displays individual prices for apples, oranges, and grapes purchased along with the total price (before and after discount) and the total discount given. The screenshot below is a sample of the Display Price page (display_price.jsp). The HTML source generated by display_price.jsp (for the figure shown above) is as follows <html> <table border="1"> <tr> <th bgcolor="#C9C299">Item</th> <th bgcolor="#C9C299">Price</th> </tr> <tr> <td>Apple</td> <td>$16.0</td> </tr> <tr> <td>Orange</td> <td>$0.0</td> </tr> <tr> <td>Grape</td> <td>$0.0</td> </tr> IS203/2008-091/684088566 Page 15 of 27 IS203 – Software Engineering <tr> <td>Price Before Discount</td> <td>$16.0</td> </tr> <tr> <td>Discount</td> <td>$4.0</td> </tr> <tr> <td>Amount To Be Paid</td> <td>$12.0</td> </tr> <table> <a href="point_of_sale.jsp">Go To Point-Of-Sale Page</a> </html> Below is the code for the 3 pages. Fill in the appropriate code in the boxes provided. Do NOT modify code outside the boxes provided. - point_of_sale.jsp <html> <form name="p-o-sale" action="process_order.jsp" method="get"> <table border="1"> <tr> <th bgcolor="#C9C299" align="center">Item</th> <th bgcolor="#C9C299" align="center">Quantity (KG)</th> </tr> <tr> <td><input type="checkbox" name="fruits" value="apple"/> Apple </td> <td><input type="text" name="apple-qty" value="0"/></td> </tr> <tr> <td><input type="checkbox" name="fruits" value="orange"/> Orange </td> <td><input type="text" name="orange-qty" value="0"/></td> </tr> <tr> <td><input type="checkbox" name="fruits" value="grape"/> Grape </td> <td><input type="text" name="grape-qty" value="0"/></td> </tr> </table> Special Privilege Code: <input type="text" name="priv-code" size="3"/> <br/><input type="submit" value="Process Order"/> </form> </html> - process_order.jsp // import the necessary packages used [1 mark] IS203/2008-091/684088566 Page 16 of 27 IS203 – Software Engineering //You must use hPrivileged to compute privileged discount <% // Step 0: Initialization HashMap<String,Double> hPrivileged = new HashMap<String,Double> (); hPrivileged.put(“AAA”,0.05); hPrivileged.put(“BBB”,0.10); hPrivileged.put(“CCC”,0.25); // unit prices for fruits double appleUnitPrice = 2; double orangeUnitPrice = 2.2; double grapeUnitPrice = 2.3; // use double double double these to store the total price of each fruit purchased appleTotalPrice = 0.0; orangeTotalPrice = 0.0; grapeTotalPrice = 0.0; // use these to store the quantity of each fruit int appleQty = 0; int orangeQty = 0; int grapeQty = 0; // Step 1: Compute the total price of the grapes, apples, // and oranges. [4 mark] IS203/2008-091/684088566 Page 17 of 27 IS203 – Software Engineering // Step 2: Compute the regular discount. [3 mark] IS203/2008-091/684088566 Page 18 of 27 IS203 – Software Engineering // Step 3: Compute the privileged discount. [2 mark] // Step 4: Compute the actual discount & send to display_price.jsp [3 mark] %> IS203/2008-091/684088566 Page 19 of 27 IS203 – Software Engineering - display_price.jsp // import the necessary packages used [1 marks] <html> IS203/2008-091/684088566 Page 20 of 27 IS203 – Software Engineering <a href="point_of_sale.jsp">Go To Point-Of-Sale Page</a> </html> [2 marks] Question: Explain things that need to be changed in order to make the application follow the Model-View-Controller (MVC) architecture. Answer must fit within the box. [4 marks] IS203/2008-091/684088566 Page 21 of 27 IS203 – Software Engineering 4. Git I. Jerry accidently deleted the app folder (and cleared his recycle bin) inside his IS203Project Git directory. His pair programming partner suggests to clone a new copy (from the remote Git server) of the entire SE project into a separate folder called IS203-Project-New and use that for the pair programming session instead. Do you agree that this is a possible solution? Explain your answer in one sentence. In another sentence, explain what Jerry must do, if anything, to fix the IS203-Project directory. [3 marks] Answer: Circle one : Agree / Disagree II. Git is more useful for versioning binary files (.ppt, .jpg, .vpp, .pptx, .xlsx, .doc, .class) compared to versioning text files (.java, .jsp, .txt, .html, .css). Do you agree/disagree? Explain your reasoning in TWO or less sentences. [3 marks] Answer: Circle one : Agree / Disagree III. Given the following scenario 1. Edward does a Git pull. 2. Fred does a Git pull. 3. Fred edits line 14 of question.txt. 4. Fred does a Git commit & Git push. 5. Edward edits line 12 of question.txt. State the steps that Edward will take until his changes are pushed to remote Git repository successfully. If any conflict is encountered, state whether TortoiseGit will resolve the conflict automatically or is manual intervention is required. [2 marks] Answer: IS203/2008-091/684088566 Page 22 of 27 IS203 – Software Engineering IV. Using TortoiseGit, Kathy does a Git push and it fails. Hence, Kathy does a Git pull and there is a merge conflict in problem.txt. Complete the steps below so that Kathy resolves the conflict in a correct manner. You do not need to fill up all the steps. [2 marks] Answer: 1. 2. 3. 4. Kathy closes the Git pull dialog. TortoiseGit prompts "Do you want to see changes. Kathy clicks "Yes". TortoiseGIT displays the list of conflicts. For this case, there is only problem.txt that has conflicts. 5. 6. 7. 8. 9. 10. IS203/2008-091/684088566 Page 23 of 27 IS203 – Software Engineering THIS PAGE IS INTENTIONALLY LEFT BLANK! IS203/2008-091/684088566 Page 24 of 27 IS203 – Software Engineering THIS PAGE IS INTENTIONALLY LEFT BLANK! IS203/2008-091/684088566 Page 25 of 27 IS203 – Software Engineering THIS PAGE IS INTENTIONALLY LEFT BLANK! IS203/2008-091/684088566 Page 26 of 27 IS203 – Software Engineering THIS PAGE IS INTENTIONALLY LEFT BLANK! IS203/2008-091/684088566 Page 27 of 27
© Copyright 2026 Paperzz