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

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.



A university that you attend requires an application that will print out a Course Report. You are required to create an application with this course data:

       COURSE CODE

DISD DIWD DIDM

COURSE NAME

Diploma in Software Development Diploma in Web Development Diploma in Data Metrics

STUDENT NUMBERS

35 28 39

LECTURER

Mr Jones Mrs Smith Mr Ntsinga

   In your main class must include a static method to handle the printing of the course report:

COURSE REPORT

Course Diploma in data metrics

Lecturer Mr Ntsinga

venue : venue 1

Would you like to exit the application?Enter (y) to use the exit or any other key to continue(JOptionPane input-must be a while loop)


What is the output of the following Java code?

count = 1;

y = 100;

while (count < 100)

{

y = y - 1;

count++;

}

System.out.println("y = " + y + " and count = " + count);

9. Which of these keywords is used to by the calling method to guard against the exception that is thrown by called method? Please select the correct option "A, B, C, D, or E"


A. try

B. throw

C. throws

D. catch

E. finally


8. Given the following code, the output is __. Please select the correct option "A, B, C, D, or E"


try

{

Integer number = new Integer("1");


System.out.println("An Integer instance.");

}

catch (Exception e)

{

System.out.println("An Exception.");

}


A. An Integer instance.

B. An Exception.

C. 1

D. Error: Exception

E. None of the options


7. Given the following code, the output is __. Please select the correct option "A, B, C, D, or E"


class Sample

{

public static void main (String[] args)

{

try

{

System.out.println(5/0);

}

catch(ArithmeticException e)

{

System.out.print("Divide by zero????");

}

finally

{

System.out.println("5/0");

}

}


A. Divide by zero????

B. 5/0

C. Divide by zero????5/0

D. 5/0Divide by zero????

E. "5/0"


6. In Java, __ is the only type of exception that is NOT checked. Please select the correct option "A, B, C, D, or E"


A. The Exception class.

B. The RunTimeException class and its subclasses.

C. The IOException class and its subclasses.

D. The ArithmeticException class only.

E. The Throwable class only. 


5. Which method of the "Exception" class prints a list of methods that were called before the exception was thrown? Please select the correct option "A, B, C, D, or E"


A. printErrors()

B. getMessage()

C. printStackTrace()

D. traceStack()

E. toString()


4. Which method of the "Exception" class returns a message string? Please select the correct option "A, B, C, D, or E"


A. getError()

B. getMessage()

C. printMessage()

D. traceMessage()

E. toString()


2. A programmer carelessly assigned a negative value as index of an array. Which type of exception will be raised during execution? Please select the correct option "A, B, C, D, or E"


A. An IndexOutOfBoundsException is thrown.

B. A NumberFormatException is thrown.

C. The first slot of the array is used.

D. This is an Error, so the program immediately terminates no matter what.

E. The last slot of the array is used


LATEST TUTORIALS
APPROVED BY CLIENTS