There is a 0 tolerance cheating policy: any use of unauthorized materials will immediately result in a 0 on the exam. As stated in the syllabus, honor code violations may also result in an immediate F for the entire course.
Exam 1 Review
Exam Format
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. Please plan to complete the exam in a single sitting.
The exam questions may consist of:
The order you see questions and possible answers may be randomized. Most questions will be automatically graded by Canvas, except short answer and code snippets which will be graded manually by the instructor.
The exam will be conducted on Canvas on the lab computers and NOT on your laptops. You may access to the following websites during the exam:
-
Java 11 Documentation, including the Java 11 API, the Java Tutorials, the Java SE 11 Language Specification, and the Java Glossary.
-
JUnit 5 Documentation, including the JUnit 5 API and the JUnit 5 User Guide.
-
Log4j2 Documentation, including the Log4j2 API and Log4j2 Core API, and the Log4j2 Manual.
The exam is otherwise closed-book closed-note. You may not reference any other websites other than Canvas and the approved websites above, e.g. you may not look at the class website, Github, StackOverflow, or Google. You may not open any other program other than the the browser, e.g. you may not open Eclipse or run Java. You may not reference your cell phone or tablet during the exam (even if you take a bathroom break). You may not look at the monitors of your fellow classmates.
You may ask the instructor for one piece of blank paper during the exam to use as scratch paper, but must turn in this paper at the end of class. You may not use your own paper.
You will be asked to completely clear the tables of all items except for the piece of scratch paper, and a pencil. This includes any bags, food or drinks, or cell phones.
You may ask the instructor for clarification on a question during the exam.
Exam Retake
You will have an opportunity to retake the entire exam during the next class period. The retake format is the same as before, except that the Lockdown Browser will not be used on the retake. However, you are expected to adhere to the same rules (e.g. only access allowed websites).
In addition to the allowed websites, you can also consult the instructor for hints if you do not know how to fix an answer. The instructor will also go through hints for difficult questions on the board during the retake process. You will also have access to the answers on your original attempt, but the order of questions may not be the same!
You will be able to earn back a percentage of points that you missed on your original attempt. The exact percentage is determined by the exam average. The exact formula used is as follows:
Original Percentage + ( Retake Percentage - Original Percentage ) x Retake Percent
For example, suppose you earned an 80% on your original attempt and improved that to 90% on the retake. If the retake percentage is 50%, then your final score will be:
80% + ( 90% - 80% ) x 50% = 80% + ( 10% ) x 50% = 80% + 5% = 85%
It is impossible to earn a lower score due to the retake process. If your retake score is lower than your original score, we will use your original score instead.
Exam Topics
The exam will cover topics on all of the lecture slides, homework assignments, quizzes, and additional resources covered thus far in class. This includes:
Week | Topic and Code | Slides | Quizzes | Homework | Videos |
---|---|---|---|---|---|
1 |
|
N/A | N/A | ArgumentMap |
Tue Thu |
2 | Data Structures | Types • Framework | Data Structures | PrettyJSONWriter |
Tue Thu |
3 | Object Oriented Programming | OOP Terminology | Instances • Members • Mutability Part 1 • Mutability Part 2 | TextFileStemmer |
Tue Thu |
4 | Inheritance | Introduction • Object Revisited • Final Keyword • Abstract Classes and Interfaces • Collections Revisited • Casting • Nested Classes • Generics | Final Keyword • Collections Revisited • Casting • Terminology | WordIndex |
Tue Thu |
5 | Lambda Expressions • Streams |
|
Lambda Expressions | TextFileFinder |
Tue Thu |
6 | Unit Testing | Motivation • Approaches • Unit Testing | Unit Testing | N/A |
Tue Thu |
See the Schedule for more information. Anything listed above that is crossed-out will not be included on the exam. Where possible, the practice quiz (does not count towards grade, unlimited attempts, and can see correct answers) is linked instead of the original quiz.
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 what each keyword in Java means, including:
public
,private
,static
,final
,class
,abstract
, andinterface
. -
You should understand the difference between a primitive type and an object.
-
You should understand how to use different control-flow statements, such as
if
,else if
,else
statements,for
and enhancedfor
loops,while
anddo-while
loops,switch
statements, and how to use related keywords such asbreak
,continue
, andreturn
. -
You should understand how to create and use
String
objects. -
You should be familiar with the
Object
class and all of its methods. -
You should understand how to use the
new
keyword and its significance when it comes to memory allocation and thefinal
keyword. -
You should understand the difference between mutable versus immutable objects, and when it is safe to pass a reference of an object.
-
You should understand the difference between the abstract data types list, set, and map.
-
You should understand how and when to use different built-in data structures, such as
ArrayList
,LinkedList
,HashSet
,TreeSet
,HashMap
, andTreeMap
. -
You should understand how to create, access, and efficiently iterate through a nested data structure, and understand how to compare the pros/cons of different approaches to iteration.
-
You should understand how to create and use classes, including the meaning of terms like constructors, methods, and members.
-
You should understand how to design a class to be both generalized and encapsulated.
-
You should understand how to overload and override methods.
-
You should understand how to catch and throw exceptions.
-
You should understand how to use a try-with-resources block, as well as a traditional
try
/catch
/finally
block. -
You should understand the difference between a relative path and absolute path.
-
You should understand how to read and write to files line-by-line and traverse directories using the Java 10 NIO package and the
Path
,Paths
,Files
,BufferedReader
,BufferedWriter
, andDirectoryStream
classes. -
You should understand inheritance-related terms such as superclass, subclass, direct, and indirect, as well as keywords such as
this
andsuper
. -
You should understand the difference between an interface and an abstract class.
-
You should understand how to create a nested class, and the difference between different types of nested classes.
-
You should understand how to create an anonymous inner class, and the inheritance relationships that class has to its outer class and its superclass.
-
You should understand concepts such as upcasting and downcasting, as well as how they are useful.
-
You should understand how to extend the
Comparator
andComparable
interfaces to allow for custom sorting usingCollections.sort()
. -
You should understand how to create functional interfaces using the
@FunctionalInterface
annotation. -
You should understand how to create and use lambda expressions, and the difference between lambda expressions and anonymous inner classes and interfaces.
-
You should understand how to create and use streams and stream pipelines, and the differences between a stream and a collection.
-
You should understand terminology with respect to stream operations, including intermediate versus terminal operations, lazy versus eager operations, and what it means for an operation to be non-interfering, stateless, and without side-effects.
-
You should understand how to interpret JUnit test classes, and create your own JUnit tests. This includes understanding the
@Test
,@Nested
,@BeforeEach
,@AfterEach
,@ParameterizedTest
, and@TestFactory
annotations and the methods in theorg.junit.jupiter.api.Assertions
package. -
You should understand how to use assertions in Java using theassert
keyword, and where it is (or is not) appropriate to use. -
You should understand how to configure and use Log4j2 for logging and debugging. If given a configuration file, you should be able to determine where log messages will go (file or console), which level log messages will be output (all, info, debug, etc.), and in what format.
SDS Accommodations
Students may receive exam accommodations, such as additional testing time or a more private exam setting, through Student Disability Services. If you are planning on using these exam accommodations, please read the following.
Requests
I must receive a notification for accommodation from SDS regarding this exam at least one week before the exam itself. You may have SDS proctor the exam, but you will be expected to take the exam on the same day as the rest of the class.
Exam
For exams proctored by SDS, Canvas will be configured to automatically allow you to (1) begin the exam at your scheduled appointment time and (2) give you the additional time stipulated by your SDS alternative testing contract.
You may take the exam on your own laptop or on a computer provided by SDS, but will be expected to use the Lockdown Browser. It will be configured to automatically allow you access to the allowed Java, JUnit, and Log4j2 websites. If necessary, you can bring your own piece of scratch paper and turn it in directly to the professor when you are done.
I will be actively monitoring email for questions from your proctor, but there might be up to a 20 minute delay if your appointment happens when I am in class or in code reviews.
Retake
You may decide whether to use SDS accommodations for the exam retake. The retake generally takes less time than the original exam, and most students decide not to use SDS accommodations for the retake process. Since you are allowed to ask for help during the retake, this allows you to receive more immediate help and feedback.
If you do choose to use SDS exam accommodations for the retake, I will prepare some general hints you can use during the retake. The SDS proctor can send me your questions via email, but I may not be immediately available to answer those questions during your scheduled time.