Labs

Lab 1

lab1 instruction

  • Compiled language vs. interpreted language.
    • Why compilation?

Lab 2

In your own programs, if you find yourself copying multiple lines of code for reuse, it is usually wise to put the common code into a new shared method.

toString()

  • Any object can have a toString method, and if it does, that method will be automatically called when you concatenate the object to a String. (Actually, every object has a toString method, but the default toString isn’t particularly enlightening.)

Lab 4

This lab worth doing it again, especially DList1.

It helps to draw the reference relations for all the nodes on paper. Be careful with all the corner cases!

Lab 5


Answers

Why compilation?

  • check for errors such as type erros and syntax errors
  • speed up
  • verify access right and methods
  • more

results matching ""

    No results matching ""