SECTION A
1.Short answer (explain High Level Language, OOP, Class, Object, Abstraction, Graphic (AWT and Swing))
2.Show output (selection, looping etc)
example:: Show output of the following java code :-
int x,y;
x=7,y=5;
if(a>b)
System.out.println (“Yes”);
else
System.out.println (“No”);
3.Draw flowchart of a given code
SECTION B
1.Show output and draw UML diagram for a given code.
2.Write a simple java program (ex::input a value in fahrenheit, convert to celcius. Read 50 integer and print in reverse order)
SECTION C
Write a class based on given data or instruction. (same question given during lab session)
12/17/2013
12/09/2013
BCS2233 OOP: Quiz 4
Name:_______________________
Matric:_______________________
Course:_______________________
CHAPTER 12
1. Explain the difference between AWT GUI components, such as java.awt.Button, and Swing components, such as javax.swing.JButton.
2. Show the output of the following java code:
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JButton jbtOK = new JButton("OK");
System.out.println(jbtOK.isVisible());
JFrame frame = new JFrame();
System.out.println(frame.isVisible());
}
}
Matric:_______________________
Course:_______________________
CHAPTER 12
1. Explain the difference between AWT GUI components, such as java.awt.Button, and Swing components, such as javax.swing.JButton.
2. Show the output of the following java code:
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JButton jbtOK = new JButton("OK");
System.out.println(jbtOK.isVisible());
JFrame frame = new JFrame();
System.out.println(frame.isVisible());
}
}
12/01/2013
BCS2233 OOP: Quiz 3
Name:_______________________
Matric:_______________________
Course:_______________________
A. TRUE/ FALSE (5 Marks)
1. You can derive a new class from an existing class. This is called as class inheritance. (T/F)
2. The new class (derived class ) is called a superclass. The existing class is called child class.(T/F)
3. Constructors are a special kind of methods that are invoked to construct objects(T/F)
4. To override a method, the method must be defined in the derived class using the same signature as in its existing class.(T/F)
5. All method including a private method can be overridden.(T/F)
B. Design a class named person and its two subclasses named student and employee. A person has a name, address, phone, and email address. A student has a status. An employee has an department, salary and date hired.
Draw the UML diagram for the classes.
(10 Marks)
* untuk soalan B. 1. Bina Class (tak perlu buat program penuh) 2. Lukis UML.
pls submit before 5:00 pm.
Matric:_______________________
Course:_______________________
A. TRUE/ FALSE (5 Marks)
1. You can derive a new class from an existing class. This is called as class inheritance. (T/F)
2. The new class (derived class ) is called a superclass. The existing class is called child class.(T/F)
3. Constructors are a special kind of methods that are invoked to construct objects(T/F)
4. To override a method, the method must be defined in the derived class using the same signature as in its existing class.(T/F)
5. All method including a private method can be overridden.(T/F)
B. Design a class named person and its two subclasses named student and employee. A person has a name, address, phone, and email address. A student has a status. An employee has an department, salary and date hired.
Draw the UML diagram for the classes.
(10 Marks)
* untuk soalan B. 1. Bina Class (tak perlu buat program penuh) 2. Lukis UML.
pls submit before 5:00 pm.
Subscribe to:
Posts (Atom)
Cara download Installer windows 10 dalam format ISO
1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan. ...
-
ANSWERS TO CHAPTER EXERCISES (CHAPTER 8) Review Questions 1. List and describe various types of output, including technolog...
-
Based on real life scenario on any local company/ organization which you are very familiar, define the problem that could be addressed thr...
-
A. Response to the following statements by circling either T (TRUE) or F (FALSE). [10M] I. 1. Java enables users...