オブジェクト指向言語・期末テスト解答用紙(2023 年 07 月 27 日)解答例

学籍番号         氏名            

  1. (3 × 2)

    (1)  (B) (2)  (A)

  2. (3 × 5)

    (1)System.currentTimeMillis()
    (2)e.getKeyChar()
    (3)e.getWhen()
    (4)Character.isDigit(c)
    (5)e.isShiftDown()

  3. (1, 1, 3, 4)

    (1)extends JPanel implements ActionListener
    (2)extends JPanel
    (3)  e -> {
      △
      label.setText(text);
     }
     
     
     
    (4)  e -> {
      ▽
      label.setText(text);
     }
     
     
     

  4. (4 × 2)

    (1)The sum is 35.
    (2)3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, 22, 29, 39, 51, 68, 90, 119, 158, 209,

  5. (4 × 2)

    (1) (A), (B), (D) (2) (C), (E)

  6. (12)

    I am a 0 week old caterpillar. I have 16 legs.
    〃 0 〃 tadpole. 〃 0 〃 .
    〃 0 〃 earthworm. 〃 0 〃 .
    〃 2 〃 caterpillar. 〃 16 〃 .
    〃 2 〃 tadpole. 〃 2 〃 .
    〃 2 〃 earthworm. 〃 0 〃 .
    〃 4 〃 pupa. 〃 0 〃 .
    〃 4 〃 frog. 〃 4 〃 .
    〃 4 〃 earthworm. 〃 0 〃 .
    〃 6 〃 butterfly. 〃 6 〃 .
    〃 6 〃 frog. 〃 4 〃 .
    〃 6 〃 earthworm. 〃 0 〃 .
     
     

  7. (4 × 3)

    (1)new Thread(this)
    (2)null
    (3)Thread.currentThread()

授業・テストの感想