LMU ☀️ CMSI 186
PROGRAMMING LABORATORY
Practice

Programming Practice

The laboratories in this course are designed to help you acquire skills through practice. But it seems like you can never get too much practice. Here are some good sites with tons of programming practice. Why should you visit them? A couple reasons: practice is good, and like it or not, many of the problems on these sites do show up in programming interviews.

Reinforcement Questions

Do you like spaced repetition learning? Have you used Anki or Quizlet? Whether or not spaced repetition works, or works for you, periodically working on flash-card like questions can be a lot of fun, and just may help you retain information. Here are a few problems tied to the course material. Visit them periodically!

  1. Write a complete Java program that when executed, writes the string "Hello" to standard output. Assume the program is stored in the file Greeter.java.
  2. What is the command that both compiles and runs the program in Greeter.java?
  3. Write a complete program in the file Echo.java, that writes each of the command line arguments, one per line, to standard output. What output would you expect from running:
    $ javac Echo.java && java Echo one 'two three' 55
    
    Run the command and see if you were correct.
  4. What is the command to list all the files in the system root directory?
  5. What is the command to make your home directory the current directory?
  6. How do you move the file named Player.java, which is currently in the parent directory of the current directory, to the current directory?