CSCI 265: Fall 2024 Final Exam


Question 1: Version control [10]

Suppose a small group of second year students has a project they want to work on together outside their regular coursework, and they have been using a github repo with the following branches: At the moment, they have no structured plan/process for properly updating the various branches. They feel the current contents of the 'high performance' branch are ready to be tested and potentially become the new production version.

Outline a process for the team to follow to use their various branches to perform testing (assume they do actually have test cases/software ready) and, if successful, update the production branch. Be sure to point out both the strengths and weaknesses of your proposed plan.


Question 2: SDLCs and testing [10]

In our team projects this term we waited until phase 5 to officially discuss/address the testing of the product, and even then focused on a client-side acceptance testing plan that would (in theory) be applied after the product was completed.

(i) Propose a revised SDLC that would address testing more thoroughly and beginning test planning from an earlier point in the term.

(ii) Discuss how your revised SDLCwould fit with the CSCI 265 lecture material, including any suggested changes for the order and/or depth that topics are addressed in.

Question 3: Requirements [10]

Write a detailed set of requirements for a program to be written by CSCI 159 students (students taking their first course in C++ programming). The general concept for the program is as follows:


Question 4: Design [10]

In object-oriented languages, the data fields of a class are an example of coupling between the methods of the class since they are values that can be accessed and manipulated by all the methods.

Discuss if/how/why this is an accepted norm in spite of the fact that, in the context of cohesion, this would appear to be undesirable.


Question 5: Make/automation [10]

For each of the actions below recommend whether they would be best accomplished using makefiles or using scripts and briefly justify each recommendation. (Assume a linux environment and they are being written by students who have successfully completed CSCI 265.)

  1. Creating an archive of all project source code files in a repository.

  2. Removing all the built object and executable files in a repository.

  3. 'touch' all the .md files in all subdirectories in the repository.

  4. 'touch' all the .cpp files in all subdirectories in the repository.

  5. print a list of all the object files and executables that are in need of recompilation.


Question 6: Code re-use [10]

Consider the following project and data structure to be implemented in C++:

(i) Is it worth templating the data structure? Justify your answer.

(ii) Is it worth adding an stl-style iterator to the data structure? Justify your answer.

(iii) Is it worth seeking a third party implementation of the data structure? Justify your answer.

Question 7: Testing [10]

Consider the main routine and the insert and search functions described below, then:

(i) Outline a process for unit testing the insert function in isolation, including outlining any needed stubs/drivers.

(ii) Discuss the practical challenges your proposed process/stubs/drivers would cause for the testers (e.g. in creating test cases, running test cases, and evaluating the results).

Be sure to state any assumptions you find it necessary to make.


Question 8: Bug handling [10]

Study the bug report and program description below, then answer questions (i) and (ii).

(i) Is there enough information in the report to allow you to make a reasonable start on tracking down the source of the problem in the student's code? If not, then identify the most crucial missing elements from the report and why you would need them.

(ii) Suppose you are mentoring an average first year computer science student faced with this bug: give the student a short guide on how to narrow down the source of this problem, making sure your guide is very explicitly focused on this specific program and this specific bug.