Below are materials for SI Leader Adam’s Object Oriented Programming, instructed by Glinos, section 1, Spring 2017.
On a computer with no IDE? Try this online java compiler!
Problem of the Week
Hey, guys! This is where I am going to be posting our problem of the week. All input should be read from standard in and all output should be printed to standard out. For Java, this means opening a scanner on System.in for input, and using the regular System.out.print/println/format/printf for output. If this confuses you, see the example problem. Try it for yourself before you look at the solution! In general, I will not be posting solutions to these problems. If you have any questions, feel free to bring any of these problems to one of my sessions!
Example Problem : Simon Says
Example Solution : i.java
Example Execution: example.png
Note that I print out an answer immediately when I determine it. This is because all input will be passed in at the same time, rather than you typing it in line by line. This means that input won’t get in the way of the output, and as such you can just print out an answer when you get it, rather than storing it and printing it out after you have read in and processed all of your input.
To simulate this, type out your test data in a text editor first. Then, copy all of your input data and paste it into your console/terminal, then hit enter. The test data should stay clumped together, and your output should print out immediately following it.