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

学籍番号         氏名 解答例        

  1. (3 × 2)

    (ⅰ) (A), (B), (E), (F) (ⅱ) (C), (E)

  2. (3 × 4)

    (ⅰ) Jsoup.parse(f)
    (ⅱ) elem.before("<hr>")
    (ⅲ) elem.firstElementChild().after("<li>????</li>")
    (ⅳ) elem.empty()

  3. (1, 1, 1, 3, 3, 1, 1, 1)

    (ⅰ) button1.addActionListener(this)
    (ⅱ) button2.addActionListener(this)
    (ⅲ) button3.addActionListener(this)
    (ⅳ) extends JPanel
    (ⅴ) src = s; dst = d;
    (ⅵ) button1.addActionListener(new ButtonListener(0, 1))
    (ⅶ) button2.addActionListener(new ButtonListener(1, 2))
    (ⅷ) button3.addActionListener(new ButtonListener(2, 0))

  4. (4 × 2)

    (ⅰ) 48
    (ⅱ) [11, 22, 45, 15, 5, 10]

  5. (4 × 2)

    (ⅰ) (D) (ⅱ) (C)

  6. (4, 8)

    (ⅰ)(B), (C), (D)
    (ⅱ) position: (10.00, 0.00), direction: 0.00
    position: (10.00, 20.00), direction: 90.00
    position: (20.00, 20.00), direction: 0.00 
    position: (10.00, 0.00), direction: 0.00 
    position: (10.00, 20.00), direction: 90.00 
    position: (10.00, 20.00), direction: 0.00 
    position: (10.00, 0.00), direction: 0.00 
    position: (10.00, -20.00), direction: -90.00 
    position: (20.00, -20.00), direction: 0.00 
     
     
     

  7. (4 × 3)

    (ⅰ) thread = null
    (ⅱ) current == thread
    (ⅲ) repaint()

授業・テストの感想