The exam will require you to write code in the lab, either on the lab machines or with your own laptop. This code will be turned in via Canvas by the end of the class. It will be similar in style to the lab assignments. You may NOT reference your previous submissions, and you may NOT access the internet for any reason other than to submit your solution via Canvas. Violations of these rules will result in a 0 on the exam.
You may bring in a single 8 1/2 x 11 inch sheet of paper containing handwritten notes, and you may write on both sides of the paper.
The review below, in addition to everything you wrote for your labs, is intended to be comprehensive. All topics which could potentially be on the exam are somehow covered by this review or the labs. The one exception is JUnit tests: these will not be on the exam, since you've only had one assignment on them.
Hello
.
The name of the class should be Hello
.
Be sure to include main
.
(1 + 3)(2 x 7)
Write an equivalent Java expression.
(7 - 2) x 28
Write an equivalent Java expression.
String
from the userString
from the userSystem.out.print/System.out.println
statementmystery
, with the following actual parameters:
int
holding the value 5
String
holding the text foo
long
holding the value 23
double
holding the value 3.14
promptAndReadInt
which will:
"Enter an integer:"
promptAndReadIntWithPrompt
which will:
String
parameter
promptAndReadInt
method, this time by calling the promptAndReadIntWithPrompt
method.
readAndAddTwo
which will: