Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Need help with on these questions today. Deadline is 6pm 

Need help with on these questions today. Deadline is 6pm

1. (10 pts) What events do the following components generate:JButtonJTextFieldJComboBox2. (10 pts) What methods does JTable implement which are required by the interfaces implemented bythe JTable class beyond those interfaces implemented by the various parent classes of JTable?3. (10 pts) Address how the differences among these various layout managers, focusing on their behavioras their container is resized:a.FlowLayoutb.GridLayoutc.BorderLayoutd.GridBagLayoute.Absolute Positioning (explain the basic steps required for this manager as well)4. (20 pts) (Ex 1.8.2) The dining philosophers problem was invented by E. W. Dijkstra, a concurrencypioneer, to clarify the notions of deadlock and starvation freedom. Imagine five philosophers who spendtheir lives just thinking and feasting. They sit around a circular table with five chairs. The table has a bigplate of rice. However, there are only five chopsticks (in the original formulation forks) available, as shownin Fig. 1.5. Each philosopher thinks. When he gets hungry, he sits down and picks up the two chopsticksthat are closest to him. If a philosopher can pick up both chopsticks, he can eat for a while. After aphilosopher finishes eating, he puts down the chopsticks and again starts to think.a. What is wrong with everybody doing the following – other than that the philosophers never get up fromthe table?1.think for a while2.get left chopstick3.get right chopstick4.eat for a while
Background image of page 1
5.return left chopstick6.return right chopstick7.return to 1b. How can the above be fixed to avoid deadlocks?c. Is your solution starvation free? Literally!5. (20 pts) What methods must a class implementingthejava.util.concurrent.locks.Lockinterface implement? Describe some of the expectedcharacteristics of each of the methods of this interface?6. (10 pts) Explain what the JVM does when it encounters asynchronizeddirective. Hint: considercarefully what is synchronized.7. (10 pts) What happens when the JVM encounters await ()call?8. (10 pts) Describe the environment in which await ()call is legal?
Background image of page 2
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"