2002FCExamAnswers

2002FCExamAnswers - - 13 - COMPSCI 101FC CONTINUED Answer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: - 13 - COMPSCI 101FC CONTINUED Answer book SURNAME: FORENAMES: DEGREE (BSc, COP, Etc): STUDENT IDENTIFICATION NUMBER: SIGNATURE: Examiner to complete: Question Mark Question Mark 1 6 2 7 3 8 4 9 5 TOTAL ANSWER BOOK- 14 - COMPSCI 101FC Surname: ID no: Forenames: CONTINUED Question 1 (5 marks) a) Output: x5 (where x is any digit from 0 to 9) (1 mark) b) 0.3 (1 mark) c) (3 marks) public class Question1 { public void go { Sytem.out.println("Good luck for the exam"); int mark = 50 * 2; System.out.println(I hope your mark is " + mark); } } Question 2 (12 marks) import java.awt.*; import java.awt.event.*; public class Q2 extends Frame implements ActionListener { private TextField tRadius; private Button bBigger; private Button bSmaller; private int radius; public void init() { tRadius = new TextField("20"); tRadius.addActionListener(this); add(tRadius); radius = 20; bSmaller = new Button("Smaller");...
View Full Document

This note was uploaded on 03/01/2012 for the course COMPSCI 101 taught by Professor Adrianaferraro during the Summer '12 term at Auckland.

Page1 / 11

2002FCExamAnswers - - 13 - COMPSCI 101FC CONTINUED Answer...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online