/* Punters Lounge JAVA programming course * * Lesson3.java * * Required file/class : Scoreboard.class * * * Author : Erik Datapunter * Date : 28/apr/2004 * * Displays a football scoreboard. * */ public class Lesson3 { public static void main(String[] args) { // create a new Scoreboard object and name it Localgame Scoreboard Localgame = new Scoreboard(0,0); // fill the scoreboard with a game score Localgame.home = 1; Localgame.away = 2; // display the game score, being the state of the object System.out.println(Localgame.home); System.out.println(Localgame.away); // display the total number of goals, being the result of the goals() method System.out.println(Localgame.goals()); } }