Java – Three class template.

In the grade 11 exam you are expected to write applications with at least three classes i.e.

  1. A UI class. Creates the manager class. Calls the methods it needs. May have some input and output.
  2. A manager class for all your methods.
  3. A template class from which you will instantiate objects. Will have your “getter” and “setter: methods and a toString method(s).

An important technique is to write a bare-bones class with very little code, BUT it runs. THEN you can study the exam paper and begin to add the specifics. Obviously name the classes to match the exam paper.

Here is a template model of a three class application for you to study and use in your exams. Click on the links and download – you may have to open it in Wordpad before you cut-and-paste the code into NetBeans where you can run it.

UI Class

Manager Class

Template class from which to create objects

Overview text document.

 OUTPUT: see below

 Java coding for schools