Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

* 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.


Program 1 - Vehicle load capacity Every vehicle has a maximum value, in kilograms, that can be loaded unto the vehicle.  You must write a small application in JAVA that can assist a builder to determine if the goods he wants to buy weighs less than load capacity of his truck.  Your program must:- 1. Read the load capacity of the vehicle as input 2. Read the name and weight of three items as input 3. Calculate the total weight for the items 4. Display all items and the weight. 5. Display the total weight for all items 6. 


Suppose that the input is:

58 23 46 75 98 150 12 176 145 -999

What is the output of the following program?

import java.util.*;

public class FindTheOutput

{

static Scanner console = new Scanner(System.in);

public static void main(String[] args)

{

int num;

num = console.nextInt();

while (num != -999)

{

System.out.print(num % 25 + " ");

num = console.nextInt();

}

System.out.println();

}

}



You must design a COVID-19 screening application for your campus. The guards at each gate will screen the students . The capabilities and features of the application should include a choice between the following functions:

1. A screening survey which will allow guards to record the students’ screening data.

 *No student should be allowed access to the campus after 12h00 in the afternoons regardless of whether capacity has been reached or not.

*If a student’s temperature is 38 degrees or more, they will not be allowed entry into the campus.

1.Make use of parrel arrays and write the pseudocode that will accurately represent the application you are designing.


You must design a COVID-19 screening application for your campus. The guards at each gate will screen the students . The capabilities and features of the application should include a choice between the following functions:

1. A screening survey which will allow guards to record the students’ screening data.

 *No student should be allowed access to the campus after 12h00 in the afternoons regardless of whether capacity has been reached or not.

*If a student’s temperature is 38 degrees or more, they will not be allowed entry into the campus.

Write the pseudocode that will accurately represent the application you are designing.


LATEST TUTORIALS
APPROVED BY CLIENTS