CS 212 Software Development

CS 212-01, CS 212-02 • Spring 2021

Exam 2 Review

This guide will discuss the logistics and possible topics for exam 2. See the Syllabus for details on the exam pass requirement.

See below for how the exam will be conducted remotely. Generally speaking, expect the exam to take at least an hour. It will be open book and conducted via Canvas. The questions and possible answers will be randomized to help combat cheating.

Remote Format

The exam will be split into two components: (1) the primary exam conducted within Canvas and (2) a short coding section conducted using Github Classroom. To complete the exam, students must have access to:

Resource Login Account Details
Canvas Login using your USF account. Used to conduct the exam. Will include the necessary Github Classroom link for the coding section.
Github Login using your Github account linked to this class. Used for the coding section. A Github Classroom link will be provided in Canvas that will setup the necessary Github repository. Only code committed and pushed to this repository before the deadline will be used.
Eclipse N/A Used to import, run, commit, and push code for the coding section. Other IDEs may be used at the students’ risk. Students should verify all of the relevant lecture code is runnable from within their IDE!
Terminal Login to CS lab network using USF CS account and the SQL database using the assigned database account. Helpful to answer SQL questions for the exam on Canvas. The exam will include copy/paste snippets to setup the relevant tables, but these will ONLY work on the CS lab network.

You will not see your answers after completing the exam until the retake begins. You will, however, be able to see your estimated score on both Canvas and Github.

The exam on Canvas will be locked with a password. You must join the lecture Zoom livestream to receive instructions and the exam password at the start of lecture time. If you have questions during the exam, you can ask questions privately in chat or raise your hand on the Zoom. If you raise your hand on Zoom, you will be placed in a private breakout room to ask your question and share your screen if needed.

While you have to join the lecture livestream at the start of the exam, you do not have to stay on the Zoom livestream while you take the exam. The Zoom livestream is there to provide you immediate help, not monitor you.

Allowed Resources

The exam is open book. You must answer each question from your understanding of the concepts; you may not consult with anyone else for help answering questions on the exam. You may ask the instructor for clarification on a question, however.

I recommend preparing to access to the following official Java documentation during the exam:

I also recommend the following official documentation from the third-party libraries we use in class:

You should also be prepared to access any of the class materials, including your homework submissions. You might also want to be familiar with jshell just in case you want to quickly run Java code.

Question Types

The Canvas exam questions may consist of:

The specific questions, order you see questions, and possible answers may be randomized. Most questions will be automatically graded by Canvas. Short answer and code snippet questions will be graded manually by the instructor.

You will also be asked to fill in code snippets using Github Classroom similar to how you complete programming homework assignments.


The exam will automatically unlock and lock at the start and end times of your enrolled section.

The exam should take around 1 hour to complete, but you will have the entire class time of 1 hour 45 minutes to complete the exam.

Any code committed and pushed to your exam repository after the deadline will be ignored.

Combating Cheating

There is a 0 tolerance cheating policy for exams. Cheating is fundamentally unfair to you, your classmates, me, and anyone that places value in your degree. When it comes to cheating:

  1. You don’t need to cheat; you have many opportunities to meet the exam pass requirement.
  2. You don’t want to cheat; the consequences of cheating are worse than failing the exam.
  3. You will get caught; I will be looking for it.
  4. It is hard to cheat and you do not have the time for it.

I will seek the maximum penalty (an F letter grade for the entire course, not just the assignment) for any cases of cheating on exams.

SDS Accommodations

Students may receive exam accommodations, such as additional testing time, through Student Disability Services. I must receive a notification for accommodation from SDS approximately one week before the exam itself.

Contact me on CampusWire to schedule a specific time to take the exam and retake. In most cases, you will start the exam with your section and have additional time past the end of lecture time. I will try my best to actively monitor CampusWire for any exam questions after lecture time ends, but will not be available to answer questions live on Zoom.

You will have an opportunity to retake the entire exam during the next class period. The final exam score will be the average of the original and retake scores. If your synchronous retake score is lower than your original score, it will be not be included in the average calculation.

The retake is conducted exactly the same as the original exam with a couple of exceptions:

  1. You will have access to your original attempt. You will see which questions you answered right or wrong (but not the correct answers). Keep in mind, however, that the retake will also use randomized questions. The exact questions from your original attempt might not match those in your retake attempt.

  2. The instructor will provide hints in the Zoom livestream on the hardest questions. You must be on the livestream to receive these hints.

The exam retake is optional. If you are happy with your current exam score and received a C or above letter grade, you can skip the retake process. Your original exam score will be used instead.

There will also be an asynchronous retake opportunity with infinite retakes that will be available for at least a week after the synchronous retake.

The exam will cover topics on all of the lecture slides, homework assignments, quizzes, and additional resources covered thus far in class. This includes:

Topic and Code Lecture Slides Practice Quizzes Homework
Regular Expressions (Code) Regex Basics LinkParserHtmlCleaner
Software Testing (Code) Testing MotivationSoftware TestingUnit Testing Unit Testing
Multithreading Basics (Code) Multithreading BasicsThread LifecycleLiveness Thread Basics
Synchronization (Code) SynchronizationCustom Locks Synchronization ReadWriteLock
Work Queues (Code) Volatile KeywordThread Pools and Work Queues Work Queues PrimeFinder
HTTP, Sockets (Code) Web BasicsURL BasicsHTTP BasicsHTML Basics Web BasicsHTTP Basics LinkParserHtmlCleanerHtmlFetcher
Servlet Basics (Code) Dynamic WebpagesJetty and Servlets Dynamic Pages
Servlet Data (Code) Servlet Context
Sessions (Code)
SQL (Code) Relational DatabasesStructured Query Language SQL JoinsSQL Grouping

Note that homework is often associated with multiple topics and appears multiple times in the table.

See the Schedule for links to the many videos and recordings made for this content.

Example Topics

The following are some example topics that you may want to make sure you understand. This is a non-comprehensive list. Some of these topics may not appear on the exam and some topics not covered here may appear on the exam.

  • You should understand how to use the Pattern and Matcher classes in Java to handle regular expressions, and the difference between the find() versus matches() methods.

  • You should understand how to create character classes, such as [a-z] and [^0-9], in regular expressions.

  • You should understand how to use predefined character classes such as \w, \W, \s, \S, and . in regular expressions.

  • You should understand how to use the ?, *, and + quantifiers in regular expressions.

  • You should understand the difference between a greedy versus reluctant quantifier in regular expressions.

  • You should understand how to create and use capturing groups and non-capturing groups in regular expressions.

  • You should understand how to use the i, m, and s flags.

  • You should understand how to use the ^, $, \A, \z, and \b boundary matchers.

  • You should understand the different ways to use the ? character in a regular expression. For example: (?i) to turn on the i flag, (?:i) to create a non-capturing group that matches the i character, [?!] to create a character class that matches the ? and ! characters, i? to match the i character 0 or 1 times (greedy), and i+? to match the i character 1 or more times (reluctant).

  • You should understand how to interpret JUnit test classes, and create your own basic JUnit tests. This includes understanding the @Test, @Nested, @BeforeEach, @AfterEach, and @ParameterizedTest annotations and the methods in the org.junit.jupiter.api.Assertions package.

  • You should understand the pros and cons to multithreading, and when to use multithreading.

  • You should understand the different states of a thread, and how methods such as start(), join(), wait(), and notifyAll() affect a thread’s state.

  • You should understand how to use the synchronized keyword, and how the object used for the lock affects the number of threads that may enter a code block.

  • You should understand how to use a custom read/write lock instead of the synchronized keyword to protect access to shared data.

  • You should understand how to use a thread pool and work queue, and how they work.

  • You should understand how to create and use worker threads (using the Runnable interface or Thread class) versus how to create and use work (or tasks, Runnable objects) to be used with a work queue.

  • You should understand basics about the Internet versus the Web, and the different components of a URL.

  • You should understand how to create and use basic sockets to connect to a server.

  • You should understand how to create basic HTTP requests.

  • You should understand and be able to create basic HTML.

  • You should understand the difference between static and dynamic web pages.

  • You should understand the basic client-server architecture used by Jetty and servlets.

  • You should understand how to create dynamic web pages using Jetty and servlets.

  • You should understand how to create, use, and modify HTTP cookies using Jetty.

  • You should understand the benefits of relational databases.

  • You should understand how to create and use statements in the Data Definition Language (DDL) of SQL. This includes the CREATE, ALTER, and DROP statements.

  • You should understand how to create and use different types of columns in SQL. This includes the INTEGER, TINYINT, SMALLINT, BIGINT, NUMERIC, FLOAT, DOUBLE, CHAR, VARCHAR, ENUM, DATE, DATETIME, and TIMESTAMP types.

  • You should understand how to use the PRIMARY KEY, FOREIGN KEY, UNIQUE, DEFAULT, NOT NULL, and AUTO_INCREMENT keywords when creating columns and tables in SQL.

  • You should understand how to create and use statements in the Data Manipulation Language (DML) of SQL. This includes the SELECT, INSERT, UPDATE, and DELETE statements.

  • You should understand how to use different types of JOIN clauses to combine results from multiple related tables in SQL. This includes INNER JOIN, NATURAL JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, NATURAL LEFT OUTER JOIN, and NATURAL RIGHT OUTER JOIN.

  • You should understand how to sort results using the ORDER BY clause in a SELECT statement.

  • You should understand how to filter results using the WHERE clause in a SELECT statement.

  • You should understand how to combine columns using the CONCAT() function and give columns aliases using the AS clause in a SELECT statement.

  • You should understand how to combine rows using the GROUP BY clause (and aggregate functions) in SELECT statement.

  • You should understand how to use aggregate functions like GROUP_CONCAT(), COUNT(), AVG(), and SUM() in a SELECT statement.