Ask Data Structure Expert

1. Describe the JSP life cycle.

Draw a diagram of the various events and transformations.

For each part of the cycle describe the items that are transformed or acted upon and what they are transformed to. In terms of HTML/Java source and bytecode/JSP tags explain where these are present.

2. Describe how you might implement logging in as used in the workshops using the session mechanism explaining what Java classes are involved and using code snippets.

Describe how you would protect pages using this.

Explain how cookies are used to implement sessions. Describe one other common use of sessions explaining the use of any extra Java classes that would be involved.

Explain the difference between session scope and TWO other scopes.

3. Using either Nielsens HOME RUN or usability principles from the course discuss FIVE usability issues that web site creators should consider. Support your discussion with examples.

4. Using Appendix A answer the following questions about the Java code supplied:

a. Write some Java code that would create an example object from this class.

b. Describe what check you would want to make and what exception could be generated in the insertStudent method.

c. Write a method that finds the youngest age of the students stored in the data structure and some Java code that could be used in a test program to display the value returned by the method on the console or command prompt.

5. Answer the following on an implementation of a LinkedList class in Java.

d. Describe the concept of Linked Lists and explain the operations using them in terms of their efficiency or inefficiency.

b. Provide a Java code definition of a Node class that will be used in a LinkedList class that will store a list of Objects.

c. Give the Java code for an implementation of the removeFirst method outlined below.

d. Draw a diagram of how the removeFirst method below should work.

Do not use the built in Java API LinkedList itself

Assume the following code is already present in the class definition of LinkedList:

private Node first; public Linked List()

{

first = null;

}

 

/**

Removes the first element in the linked list. @return the removed element

*1

public Object removeFirst()

{

// // // //

}

6. Describe a set of four methods that a queue would need to implement using a circular array and show the Java code to implement them if using an implementation given the outline definition below. Do not use any methods of the Collection classes.

public class CircularArrayQueue

private Object[] buffer; private int currentSize; private int head;

private int tail;

public CircularArrayQueue()

final int INITIAL_SIZE = 10;

buffer = new Object[INITIAL_SIZE]; currentSize = 0;

head = 0;

tail = 0;

/**

Checks whether this queue is empty. @return true if this queue is empty

*/

public boolean empty() { } /**

Adds an element to the tail of this queue. *1 @param newElement the element to add

public void add (Object newElement)

/**

Removes an element from the head of this queue. @return the removed element

public Object remove()

// Grows the buffer if the current size equals the buffer's capacity. private void growBufferlfNecessary()

Data Structure, Computer Science

  • Category:- Data Structure
  • Reference No.:- M9477934

Have any Question?


Related Questions in Data Structure

Data Communication Delivering Information anywhere

Topic: Data Communication Delivering Information anywhere. Write a 9-12 pages paper in which you: Present an overview of the origin and history of the concept. Describe the current use of and attitude toward the concept. ...

Problem regarding the management program

Problem: Looks like its just adding a save and load feature to the same file you sent me for python 3.5 Until now, you have had to leave your team management program running on your computer indefinitely since you did no ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As