Homework 2

Please review the material in the slides for Lecture 2 (Git) and Lectures 3, 4, and 5 to answer the questions below.

Format for Homework 2

IMPORTANT: For this homework assignment, I am asking that you create one Google Doc and one GitHub repo for this assignment. You will submit this assignment by performing two actions:

  • You will make me a collaborator on your Github repo by adding my user name (kenbod) to the list of collaborators on your repo. You can do this by navigating to your repo on GitHub and clicking on Settings on the right hand side of the page and then Collaborators on the left hand of the resulting page.
  • You will share your Google Doc with my CU-provided Google address (kena@colorado.edu) and granting me edit privileges. I won't actually edit your document but I might make changes via their suggestions mode or by inserting comments on the document.

See below for details on due dates.

Collaboration

Note: I strongly encourage in-class students to work in teams on these assignments. The same two steps that I list above will allow you to create documents that can easily be shared among team members.

BeBoulderAnywhere students can, of course, work in teams if you happen to know in-class students already. If you're a BBA student and would like to work on a team but don't know any of the in-class students, let me know, and I'll create a forum on the D2L site which you can use to look for team members.

Assignment Header

IMPORTANT: I had students submit assignments for Homework 1 that did not contain a header at the top of the page with information that identified the assignment or the student who submitted it! For this assignment, make sure that the top of your Google Doc and the top of your README.md file (for the git repo) contains (at the very least):

  1. A line that identifies the class and current semester (i.e. CSCI 5828 – Spring 2015)
  2. A line that identifies the homework assignment (i.e. Homework 2)
  3. A line that identifies the people who worked on the assignment (list all team members)
  4. For teams only: A line that identifies the team member that is submitting the assignment
  5. Other embellishments (such as the due date) are fine too

This requirement holds true for all subsequent assignments in this class and is a good practice to follow for all of your other classes as well!

Questions

  1. Create a git repo that produces the commit graph below. This is similar to the example I performed in Lecture 2 and will help you demonstrate your knowledge of creating git repos, making new commits, creating branches, and merging branches.

    The content in the repo should be kept to a minimum, along the lines of what I did for the Lecture 2 example (i.e. a repo with a single README.md file).

    Other than creating the graph below, the only other requirements are:

    • that one of your merges should generate a merge conflict that you have to resolve and,
    • the very last commit on the master branch must have a README.md file that contains a list of all the git commands you used to create this repo starting with the git init and ending with the git add README.md; git commit commands that were used to check in the final change of README.md on the master branch

    Since you have 15 commits to create, I would highly recommend having your commit messages reference the commit you are creating. That is, your first commit message should include a reference to Commit 0, so you can keep track of what commits you have created and what you need to do next!

    When working on this problem myself, I found it helpful:

    1. to number my commands
    2. to add lines like [EDIT README.md] to my list of commands to indicate when in the command history I edited a file
    3. and to add indications of what branch I was on when I issued a command

    As you are working with your repo, you can run the command git log --graph to see the graph that is being created. You can also use other git graph visualization tools, simiar to GitUp, to keep track of the commit graph that you are creating.

    Once you have your repository to the final state, you should then upload it to GitHub (using the instructions I covered in class for uploading an existing repository to GitHub) and add me as a collaborator. (15 points)

    Click on image to see a larger version

  2. There is a statement related to software testing that says Testing can only be used to prove the existence of faults not their absence. Explain what this statement means using the testing terminology that we discussed in Lecture 4 (Slide 14). (5 points)

  3. What are the elements of a test case when performing black box testing and how do you know if a blackbox test has passed? Write a simple function in any programming language and then write two blackbox test cases for it. (10 points)

  4. Using the control flow graph from Lecture 4, explain why a test set that achieves statement coverage is not necessarily sufficient to achieve branch coverage. You do not need to prove this assertion in general; keep your remarks to this specific control flow graph first shown on slide 33. Then, discuss why branch coverage is not sufficient to achieve condition coverage (10 points).

  5. Software engineering has worked to develop a number of software life cycles (a.k.a software processes). What are the parts of a software life cycle at an abstract level (not specific to any particular life cycle) and why does the software engineering field spend any amount of time defining them? What relationship exists between a life cycle and the software that is produced? (10 points)

Logistics

This assignment is worth 50 points and is considered submitted when you have done the following:

  1. Made Prof. Anderson a collaborator on your submitted GitHub repo.
  2. Shared your Google Doc to Prof. Anderson with edit privileges
  3. Sent an e-mail message to Prof. Anderson saying that your Homework 2 assignment is ready to be graded.

You must submit the assignment before the start of Lecture 9. That lectures starts at 12:30 PM MDT on September 22, 2015.


© University of Colorado, Boulder 2015