Java | JSP | JSF Answers

Questions answered by Experts: 3 611

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

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.


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"


LATEST TUTORIALS
APPROVED BY CLIENTS