Reference no: EM13187881
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()
What social, economic-political and religious developments
: European settlement of North America took place during the transition from Medieval to Early Modern Europe. What social, economic, political, and religious developments during this period provided motives for European exploration, conquest, and settl..
|
Find the dimensions of the poster which give largest price
: Find the dimensions of the poster which give the largest printed area
|
Explain the origins of national character
: What was the Western Problem and how did the existence of a "Frontier" help to explain the origins of national character
|
What is the probability that someone on your floor
: The campus vets club is having a raffle and is selling 1,500 tickets. If the people on your floor of the dorm bought 165 of those tickets, what is the probability that someone on your floor will hold the winning ticket?
|
Describe the jsp life cycle
: Draw a diagram of the various events and transformations. 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.
|
Tax computation
: Need help with part I, tax computation. Compute the Rose's Federal Income tax payable or refund due, assuming they file a joint income tax return, for 2009.
|
How many popsicles will be sold per day
: at a price of $1 each, 100 popsicles are sold per day in the perpetually hot town of Rostin. Consider the elasticity of supply. In the short run, a price increase from $1 to $2 is unit-elastic (Es = 1.0). So how many popsicles will be sold each da..
|
What length and width should the rectangle have
: a rectangle is bounded by the x- and y- axes and the graph of y=6-x/2. What length and width should the rectangle have so that its area is a maximum?
|
Show the possibility of declining average costs
: Give a numerical example to show that a monopolist's marginal revenue can be upward-sloping over part of its range. Hint: The price on the demand curve is the producer's average revenue. Think of the graphic that showed the possibility of declining..
|