Exam Questions Set 2 CSC2106 Object-Oriented Design & Programming
Exam Questions Set 2 CSC2106 Object-Oriented Design & Programming
Hints: Set the content-pane to 4x2 GridLayout. The components are added from left-to-right, top-to-bottom.
Section E: (6 pts)
import java.io.*;
public class Employee {
// DEPARTMENT is a constant
public static final String DEPARTMENT = "Development ";
int S = 0;
public static void main(String args[]) {
salary = 1000;
for (int i= 0; i<10 ; i= i+2) {
S += i;
}
System.out.println(DEPARTMENT + "average salary:" + salary);
}