Yurttas/PL/OOL/Java/F/04/03/10/02/Q00.java
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 Q00 {
16
17 public static void main(String[] args) {
18
19 Q q1 = new Q();
20
21 System.out.println("initial values after default construction -Q() /");
22
23 q1.output();
24
25 System.out.println();
26
27 q1.setI1(2);
28 q1.setI2(7);
29
30 System.out.println("accessor after mutator /");
31 System.out.println(q1.getI1());
32 System.out.println(q1.getI2());
33
34 System.out.println();
35
36 Q q2 = new Q(9);
37
38 System.out.println("initial values after default construction -Q() /");
39
40 q2.output();
41
42 System.out.println();
43
44 q2.setI1(3);
45 q2.setI2(8);
46
47 System.out.println("accessor after mutator /");
48 System.out.println(q2.getI1());
49 System.out.println(q2.getI2());
50
51 }
52
53}