Assignment: #assessment4 Due: 04/25/02018 Points: 4.5


There are two parts to this assessment.

Part 0: Create Assessment Questions/Exercises

Create four questions/exercises that can potentially be used on the in-class #FinalAssessment that will be given on 7 May 02018.

Each question has the following parts:

   + the question and/or exerise
   + the answer 
   + an explanation of the answer
   + the motivation for the question
   + question difficulty rating (1 for easy to 5 for hard)

Five examples are given. Note: It's possible zero or more of these examples will be used on #assessment5 (on 4/25) or the #FinalAssessment (on 5/7).

   Question: Who was the father of Java?

   Answer: James Gosling

   Explanation: James Gosling created Java during the early 1990s 
   while he was a member of technical staff at Sun Microsystems.

   Motivation: Computing students should know the computer professionals
   who are responsible for creating our present day computing world.

   Difficulty level:  1.
   Exercise:  Why does  i = 7, j = 11, k = 17  after the
              following two statements are executed.

   int i = 8, j = 10;
   int k = --i + j++;

   i = 8, j = 10;  i gets assigned 8 and j gets assigned 10
   k = --i + j++  order of operators  (k = ((--i) + (j++)))
   --i  decrements i from 8 to 7 and evaluates to 7
   j++  increments j from 10 to 11 and evaluates to 10
   7 + 10 evaluates to 17
   17 is assigned to k

   Motivation: The increment and decrement operators are 
   frequently used, so we need to know how they are evaluated. 

   Difficulty level:  2.
   Exercise:  Write pseudo-Java code that instantiates a 512-element 
   array of class Object elements such that none of the elements 
   are null pointers.

   Object[] o = new Object[512];         // A
   for (int i = 0; i < o.length; i++)    // B
      o[i] = new Object();               // C

   Statement A instantiates an array to store 512
   object variables of type Object. Statement B
   loops through the array. Statement C instantiates 
   a single Object variable and assigns it to the array.

   Motivation:  To ensure an understanding of how to create
   an array of objects.

   Difficulty level:  3.
   Exercise:  Record "stack" or "queue" for each of the following.
      line printer spooler
      reverse the digits of number
      buffered I/O

      line printer spooler........... queue
      LIFO........................... stack
      FIFO........................... queue
      reverse the digits of number... stack
      buffered I/O................... queue

   Explanation:  Line printer can print only one job at a time
   and it's usually first come/first serve. Stacks are LIFO
   (Last In First Out), while queues are FIFO (First In First
   Out). Reversing the digits of a number: push the digits
   starting with the least significant digit and then pop
   them. Buffered I/O:  Characters are read from the standard
   input stream in the ordered in which they are printed, while
   characters are printed to the standard output stream in the
   order in which they are passed to the System.out object.

   Motivation:  To ensure an understanding of the
   stack and queue data structures.

   Difficulty level:  1.
   Exercise:  Give method foo() a meaningful name.

      static double foo(double a, double x, double e) {
         if (Math.abs(a - x * x) < e) return x;
         return foo(a, (x + (a / x)) / 2, e);

   Answer:  square_root()

   Explanation:  See "Form and Content in Computer Science" by Marvin Minsky
                 (Turing Award Lecture; April 1970)

   Motivation:  Assess our understanding of recursion.  And to realize
   the importance of naming things (files, variables, methods, functions,
   classes, interfaces, packages, etc.) when using computers.

   Difficulty level:  2.

Part 1: Ethics For 50% of 1 Point

These days numerous Computer Science programs require computing students to take a computing ethics class. For example, ASU has the 1-credit CSE301 "Computing Ethics" course. The Maricopa Community Colleges' CSC100, CSC110, and CSC205 courses have the following course competency: "Discuss social and ethical issues related to Computer Science." This semester, in CSC205, 3% of a student's final grade has to do with computing ethics.

  1. Read Reflections on Trusting Trust by Ken Thompson (Turing Award Lecture; August 1984).
    on the web at:

  2. Comment on the following Ken Thompson quote.

       "You can't trust code that you did not totally create yourself.
        (Especially code from companies that employ people like me.)"
  3. Briefly explain who the 414 Gang and Dalton Gang that Thompson mentions in the following quote.

       "I would like to criticize the press in its handling of the 
        'hackers,' the 414 gang, the Dalton gang, etc. The acts 
        performed by these kids are vandalism at best and probably 
        trespass and theft at worst. It is only the inadequacy of 
        the criminal code that saves the hackers from very serious 
        prosecution. The companies that are vulnerable to this activity, 
        (and most large companies are very vulnerable) are pressing hard 
        to update the criminal code. Unauthorized access to computer 
        systems is already a serious crime in a few states and is 
        currently being addressed in many more state legislatures 
        as well as Congress. [...] The act of breaking into a computer 
        system has to have the same social stigma as breaking into a 
        neighbor's house. It should not matter that the neighbor's door 
        is unlocked. The press must learn that misguided use of a computer 
        is no more amazing than drunk driving of an automobile."
  4. On 10 April 02018 (34 years after Thompson's "Reflections on Trusting Trust"), Facebook creator/founder/CEO Mr. Mark Zuckerberg forsook his uniform and put on a suit to testified in front of Congress. Minnesota Senator Amy Klobuchar used the platform to opine the following.

       "If someone breaks into my apartment with a crowbar and they 
        take my stuff, it's just like if the manager gave them the 
        keys or if they didn't have any locks in the door -- it's 
        still a breach. It's still a break-in. I believe we need 
        to have laws and rules that are as sophisticated as the 
        brilliant products you've developed here, and we just 
        haven't done that."

    Briefly express what you think about Klobuchar's "belief" that "laws and rules" are lacking when it comes to cracking into computer systems.