Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help with these questions, if you can answer any of them it will be much appreciated, thanks! 5. Identify the root element of this

need help with these questions, if you can answer any of them it will be much appreciated, thanks!

5. Identify the root element of this XML document:

<font> <name>Helvetica</name> <size>36</size> </font>

a. DOCTYPE

b. configuration

c. header

d. none of these

e. xml

6.

Match each XML DTD element rule to its proper meaning

Question 6 options:

One of E1, E2, ..., En

0 or 1 occurrences of E

No children allowed

1 or more occurrences of E

0 or more occurrences of E

E1, followed by E2, ..., En

0 or more occurrences of text and E1, E2, ..., En

in any order (mixed content)

Text

Any children allowed

1.

E*

2.

E+

3.

E?

4.

E1|E2|...|En

5.

E1, E2, ..., En

6.

#PCDATA

7.

(#PCDATA|E1|E2|...|En)*

8.

ANY

9.

EMPTY

7. Briefly name and explain the purpose of the first two lines which should be found at the top of an XML document.

8. When a ServerSocket object is instantiated, is it possible to set a timeout value? What behavior does the timeout value control and what happens at runtime when the timeout expires?(This is meant to require a short 2-3 sentence answer.)

9. Please do the following:

Provide a working Java program that:

creates a ServerSocket object bound to TCP port 9786

sets a time out of 10 seconds

prints to standard out "Connection established" when a connection is established

takes any text received over the socket and echoes it back to the client as well as sends a message to standard output of the form "Echo message: [text]"

prints to standard out "Timeout expired" when the time out expires

Include descriptive comments where appropriate to explain what is happening at a high level

To receive full credit, your code must properly compile and then run with these two commands (assuming a Java 7 environment):

javac SocketListener.java

java -cp . SocketListener

10. Moving packets from one machine to another cannot be done with only host names, it must be done with addresses. Describe the high-level/conceptual process for resolving a hostname to an IP address in Java (hint: this can be done with a single method call). Describe, in your own words, why it is not possible to move packets without resolving the addresses of the involved hosts (even if the resolution is handled implicitly by, for example, an object's constructor).

11. Order the steps in a network server event loop

Question 11 options:

1.Gather the information requested by the client.

2. Send a response to the client through the outgoing data stream.

3. Receive a command from the client through an incoming data stream.

4. Decode the client command.

12 Which statements describe the user datagram protocol (UDP)? (can be more than 1)

Question 12 options:

a.

Commonly used for application protocols, like media streaming, which can tolerate dropped packets

b.

Utilizes a three-way handshake for the initial connection setup

c.

It is described as an "unreliable" protocol

d.

The receiver does not confirm receipt of packets to the sender

e.

Uses window scaling to control the number of packets which are sent before a confirmation of receipt is required

13. Explain the concept of a port number in computer networking.

(This question is meant to require a short, 1-2 sentence, answer.)

14. Serialized Java objects are processed with redundancy elimination, while JavaBeans are persisted by storing every property value (even default values)

true or false?

15.

Describe how and why a persistence delegate is used when working with JavaBeans. Describe an example of its use.

(This is meant to require a thorough, 1-2 paragraph, answer.)

16.What is the relationship between a property editor and a customizer when working with a JavaBean?

17.Describe some ways in which JavaBeans support/promote software component reuse.

18.Explain the difference between a commit and a push in Git.

19.

What difference is there, if any, between a class extending Thread and implementing Runnable? Which is better? Why?

(This is meant to require a thorough, 1-2 paragraph, answer.)

20.

Java supports the concept of a static initializer block. It is a class-level construct of the form:

static {

// Java code

}

Describe what triggers the execution of the static initializer block, how often it is executed, and conceptually why a programmer would choose to implement one.

(This is meant to require a thorough, 1-2 paragraph, answer.)

21.

Which of the following are valid visibility levels for classes, methods, and class variables in Java? (can be more than 1)

Question 27 options:

private

encapsulated

public

friend

protected

(no keyword) [package visibility]

transient

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions

Question

design a simple performance appraisal system

Answered: 1 week ago