Skip to content
UoL CS Notes

Java Recap

COMP201 Tutorials

This tutorial had the aim of recaping the various features of Java. You should revise the built in methods and classes from the Java package and also recap use of Thread.

Final

  • Final Classes - Cannot be extended.
  • Final Methods - Cannot be overridden.
  • Final Reference Variable & Fields - A variable that is set forever and cannot change.

Private

Only visible from within the class and not from any other class (including sub-classes).

Other instances of the same class can see private members.

Packages

Packages are the highest level of container in Java. Packages can contain:

  • Sub-packages
  • Classes
  • Interfaces

See geeks for geeks to find out more about packages.

Packages are compiled into a folder hierarchy. This allows you to sort re-usable code and reduces name collision.

You can create the hierarchy in code like so:

package pack;
public class A {
	void method1{
	}
}

Review Questions

The questions for this section are titled: Workshop Seminar 1

  1. The major problem with large scale systems is code complexity. This could be lines of code or complexity of algorithms.
  2. The maximum number of interactions between lines of code are:

    \[\frac{N(N-1)}2\]
  3. Functions, procedures and methods help in reducing the number of interactions between lines of code
  4. By limiting the access of certain code and variables you are able to further reduce complexity. For example, only code inside a class can access data and methods inside it (unless it is public). As only public and protected methods are accessible from outside the class, this reduces entry points and thus complexity.
  5. To see the main features of software processes see Software Processes.
  6. Software specification is the process of establishing what services are requires and the constraints on the system’s operation and development whereas software design realises the specification.
  7. Testing should be based on the specification. Each point of the specification should form the basis of a test.
  8. Scrum Terms
    1. Product Back-log - This is the list of remaining features that have not been completed and tested.
    2. Daily SCRUM - A morning 15 minute meeting with three questions:
      • What did I complete yesteday?
      • What do I hope to do today?
      • What will stop me from completing today’s tasks?
    3. SCRUM Master - This is the project manager. Their job is to plan and remove obstacles from the development process.
    4. Sprint - One iteration of development where the team produces and tests a new version of the product with added features.
    5. Time Box - A time limit for a particular activity.
    6. Stakeholders - Individuals who are affected by the production of the software.
    7. Sprint Burndown - A show of progress in the project so we can see if we are ahead or behind schedule.
    8. Sprint Backlog - Features that are committed to sprint but not yet completed and tested.
    9. Sprint Planning - A meeting before a sprint to determine what features to complete in the next sprint.
  9. Inventory loss describes features that are implemented but not useful to the final product.