Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For the following questions, we will be using a Model View Controller architectu

ID: 3582074 • Letter: F

Question

For the following questions, we will be using a Model View Controller architecture. Against each question choose which layers will the change affect. Note that there maybe more than one layer affected by a particular change. Some questions may not require any change at all.

Question 13: Store the model data in a DB instead of a text file

a. Controller

b. View

c. Model

Question 14: Add an option to display fixed size objects that cannot be resized

a. Controller

b. Model

c. View

Question 15: Based on the class definition below, what can be inferred about the following class B:

a. B is a bounded parameterized type restricted to be of type T which is of type A or a subclass of A.

b. T is a bounded parameterized type restricted to be of type A or a subclass of A.

c. Class T extends B

d. Class B extends A.

Question 16: What is the purpose of join() (for ex worker.join()) in a multithreaded program?

a. Create a new worker thread based on an existing thread.

b. Combine the outputs from worker threads

c. Combine the execution of current and worker thread

d. To halt program execution until the worken thread completes

Question 17: What is the difference between Java Socket, ServerSocket, and DatagramSocket?

Question 18: Which of the following is NOT a step involved in using JDBC to query a database

a. Load the JDBC driver

b. Setup a serialization socket

c. Process the resultset

d. Open a connection

e. ExecuteQuery for SELECT statements

Question 19: What is a deadlock? What are some ways of avoid deadlock?

Explanation / Answer

13: Store the model data in a DB instead of a text file

Answer: Model

14: Add an option to display fixed size objects that cannot be resized

Answer: a. Controller

15.

Question 15: Based on the class definition below, what can be inferred about the following class B:

Answer: a. B is a bounded parameterized type restricted to be of type T which is of type A or a subclass of A.

Question 16: What is the purpose of join() (for ex worker.join()) in a multithreaded program?

Answer: d. To halt program execution until the worken thread completes

Question:17

A ServerSocket is for accepting incoming network connections on some stream protocol; e.g. TCP/IP

A DatagramSocket is for sending and receiving datagrams on some connectionless datagram / message protocol; e.g. UDP/IP

Java socket: A socket is an endpoint for communication between two machines

Question 18: Which of the following is NOT a step involved in using JDBC to query a database

Answer: b. Setup a serialization socket

Question 19:

Dead lock: It is a state where between two threads or multiple threads that sometimes eill block and those blocked threads wait for the other blocked thread to unblock and this situation never ends these threads wait for others to unblock.

To avoid these ther are methods have to follow:

The techniques like

non overlapping locks, single thread, lock ordering, lock timeout.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote