CMSI 3801
Exam 2 Preparation

When

November 14-18, 2022.

Scope

Java and Swift, with a some flashbacks to JavaScript and Python. After seeing four languages, some themes should be starting to take shape in your brain. The exam is designed to assess your familiarity with both the technical and the conceptual aspects of programming language theory exhibited by these four languages.

Ground Rules

You will take the exam on BrightSpace; it will be multiple choice with a 90 minute time limit. You MAY use books, notes, and web searches to look things up. You will not be spied on: there is no browser lock down and hence no need to hide a mobile device in a bag of potato chips. However, you MAY NOT solicit answers in any way. There is to be no asking for help, no posting on forums, no communication with other humans or intelligent bots in any way; you can only “look things up.” You also MAY NOT post answers or help any other test taker either. You are bound by an honor code to follow these rules.

The exam becomes available at 6pm America/Los Angeles time on November 14 and becomes inaccessible at 10pm on November 18. You may complete the exam within any 90 minute period in that window.

Review of the Course Learning Objectives

Always keep in mind the course learning objectives, and hold the teaching staff accountable for them. Review them from the course syllabus. Also review all the questions asked on the Preparation Page for Exam 1. Are you getting more used to questions like these?

What We Have Learned So Far

We began the course with a look into how one studies programming languages, including how languages are classified and they support or do not support various programming paradigms.

Then we began our tour of programming language concepts with deep dives into JavaScript, Python, Java, and Swift. We reviewed the first two languages prior to the first exam. For more comparisons with our two newest languages, study this table and also this and this (though they may be a little out of date).

Are there any other similarities and differences can you think of?

Format of the Exam

An ideal assessment of your understanding of programming language concepts would examine (1) your ability to articulate these concepts as expressed in the design of Java and C++, and (2) your ability to articulate the similarities and differences between Java and C++ in their implementation of these concepts, through an oral exam. However, given the the number of students, this assessment will be on your recognition and evaluation of concept expression in the form of multiple choice and similar questions.

At some point during the exam window, find the quiz on BrightSpace and take it. You will have 90 minutes to complete it. Upon submission you should receive feedback and your score will be recorded in the gradebook.

How to Study

Review your answers and my answers to the first four homework assignments, particularly Homeworks 3 and 4.

Do the reinforcement problems.

Do the reinforcement problems.

Do the reinforcement problems.

Do the reinforcement problems.

Do the reinforcement problems.

Keep in mind that our (world’s) knowledge culture is far more literary than oral, so read, or reread:

You have to put in the time for effortful self-study. Although the exam is open resources, you will not have time to look everything up. Those who come in with a strong comfort level with the material will finish on time. I am assessing your fluency and your proficiency with the material, not your Google-Fu.

Sample Problems

Problems will look something like these:

  1. Which of the following statements about Java arrays is false?
    1. They are fixed size (they cannot grow and shrink)
    2. They are mutable
    3. They are covariant
    4. They can only contain objects, not primitives
  2. How does Swift ensure memory leaks never occur?
    1. It assumes a tracing garbage collector
    2. It moves objects to the heap when it detects that they are being assigned
    3. It automatically knows when to move instead of copy
    4. It doesn’t—the programmer is still responsible for ensuring memory cannot leak
    5. It uses weak references whenever cycles appear the code