Yurttas/PL/OOL/Java/F/04/03/10/02/R00.java

From ZCubes Wiki
Jump to navigation Jump to search
 1/**
 2 *  Copyright(C) 1998
 3 *  All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4 *
 5 *  Permission to use, copy, modify, and distribute this
 6 *  software and its documentation for EDUCATIONAL purposes
 7 *  and without fee is hereby granted provided that this
 8 *  copyright notice appears in all copies.
 9 *
10 *  @date   : January 1, 1998.
11 *  @author : Salih Yurttas.
12 */
13
14
15public class R00 {
16
17  public static void main(String[] args) {
18
19    R r1 = new R();
20
21    System.out.println("initial values after default construction -R() /");
22
23    r1.output();
24
25    System.out.println();
26
27    r1.setI1(2);
28
29    System.out.println("accessor after mutator /");
30    System.out.println(r1.getI1());
31
32    System.out.println();
33
34    R r2 = new R(9);
35
36    System.out.println("initial values after default construction -R() /");
37
38    r2.output();
39
40    System.out.println();
41
42    r2.setI1(3);
43
44    System.out.println("accessor after mutator /");
45    System.out.println(r2.getI1());
46
47  }
48
49}