A school called ‘Danville’ has a provision of keeping 2 kinds of Presidents: School President and Class president. (President class can be either a concrete class or an abstract class or an interface. You need to determine what it will be from the following clues.) There can be only 1 school president but there can be multiple class presidents. School and class presidents do not have any common attribute but they have a common school name which is fixed as ‘Danville’. Class presidents have a class id which school presidents do not have. Both school president and class president have a common method named exercisePower but their implementations are different. It prints “Exercising power on school” for the former and “Exercising power on class __” for the latter.
It is the final of the world’s most prestigious cricket tournament, the Indian Premier League. In the final, the Chennai Super Kings (CSK) are playing against the Mumbai Indians (MI). There is one over left for the match to end and CSK require R runs to win with W wickets remaining.
* Please select the correct letter choice "A, B, C, D, or E"
10. Which can set the background color of "panel1" to red?
A. panel1.setBackground(red);
B. panel1.setBackgroundColor(red);
C. panel1.setBackground(Color) = "red";
D. panel1.setBackground(Color.red);
E. panel1.setBackground = Color.red;
* Please select the correct letter choice "A, B, C, D, or E"
9. Which can nullify a JPanel’s layout manager?
A. pane1.setLayout(void);
B. pane1.setLayout(no);
C. pane1.setLayout(false);
D. pane1.setLayout();
E. pane1.setLayout(null);
* Please select the correct letter choice "A, B, C, D, or E"
8. Given the following code, which can add an "event handler" to "button1"?
JButton button1 = new JButton();
A.
button1.ActionListener( new ActionListener() {
public void actionPerformed(ActionEvent e) { }
} );
B.
button1.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent e) { }
} );
C.
button1.addActionListener( new ActionListener() {
public void addActionPerformed(ActionEvent e) { }
} );
D.
button1.addActionListener( new ActionListener() {
public void Performed(ActionEvent e) { }
} );
E. All of the options
* Please select the correct letter choice "A, B, C, D, or E"
7. In Java, JFrame uses the __ method to add a specified window listener to receive window
events from the window.
A. addActionListener()
B. registerActionListener()
C. eventActionListener()
D. ListenerAction()
E. addListenerAction()
*Please select the correct letter "A, B, C, D, or E". Thank you.
3. Which option of the setDefaultCloseOperation() method can ensure that Java application will
be properly terminated when the user attempts to close the "form"?
A. HALT_ON_CLOSE
B. TERMINATE_ON_CLOSE
C. EXIT_ON_CLOSE
D. DELETE_ON_CLOSE
E. DESTROY_ON_CLOSE
*Please select the correct letter "A, B, C, D, or E". Thank you.
2. Which sets the frame (or a "form") width to 100 pixels and the height to 200 pixels?
A. setSize(100, 200);
B. setSize(200, 100);
C. setDims(100, 200);
D. setDimensions(200, 100);
E. setWidth(100); setHeight(100);
*Please select the correct letter "A, B, C, D, or E". Thank you.
1. Which method do you need to invoke to display a frame (or a "form")?
A. displayWindow = true;
B. setVisible = true;
C. setVisible(true);
D. setDisplay(true);
E. setShowForm(true);
You must design a COVID-19 screening application for your campus. The guards at each gate will screen the students and enter their details on the application. :
1. A screening survey which will allow guards to record the students’ screening data.
2. Searching for a student’s details and status.
Technical Requirements:
*The application should make use of Parallel arrays that will hold the details of the student as it is entered along with their status (admitted/not admitted). No more than 300 students will be allowed on campus .
*No student should be allowed access to the campus after 12h00 in the afternoon.
* If a student’s temperature is 38 degrees or more, they will not be allowed entry into the campus.
1.Without writing the pseudocode say what will be in which module(”fillArray()”,”sortArray()”,”displayArray()” )with the information provided above.