The exam will require you to write code with your laptop by using jGRASP. 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 access the lecture slides and submit your solution via Canvas. Violations of these rules will result in a 0 on the exam.
The exam will be open-note and you are allowed to access all the class slides.
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: