Written Exam 1
- When
- Friday October 4, 9:00am–9:50am
- Where
- OHS 318
- Topics
- SLIM programming. You should
- understand that
allocate-registers is not a real instruction
- know what each SLIM instruction does
- be able to read and understand SLIM programs
- be able to count the number of instructions executed by a SLIM program
- Kotlin programming. You should
- understand values and types:
Boolean, Byte, Char, Short, Int, Long, Float, Double, String, Array
- know how to use operators:
&& || ! < <= > >= == != + - * / % ++ --
- know how to declare and use both
val and var variables
- be able to use expressions (including the
if and when expressions)
- be able to distinguish the well-typed expressions from the ill-typed expressions
- be able to use type conversion functions:
toInt(), toDouble(), etc.
- know how to write these statements:
if, when, for, while, do...while
- understand strings
- know how to use arrays
- know how to call the
Random functions nextInt and nextDouble
- know how to access the command line arguments
- be able to output through
print and println
- Exam Format
- This written exam is closed-book and mostly closed-notes. No calculator, computer, or mobile device is allowed but you may bring in a single notebook-sized sheet of paper with your hand-written notes for reference. Both sides are ok to use but computer-generated printout is not allowed.