Professional Documents
Culture Documents
Maven Exercise: (Hint:-Use Lock and Condition To Implement The Above Problem.)
Maven Exercise: (Hint:-Use Lock and Condition To Implement The Above Problem.)
(Hint: Use different ThreadPools from Executor Service, Callable, Future to achieve given
task.)
Java Concurrency Exercise 3C -
Queue
1. We have to write a program which reads the data from database and storing them in the file.
We will provide 2 types of threads – reading threads and writing threads.
o Reader threads will read the data from database and push them to queue
o Writer threads will pop the data from queue and write it to a file
The program should satisfy the following condition:-
o If reader thread is slower than writer thread, writer thread needs to wait until data is made
available in queue.
o If writer thread is slower than reader thread, reader thread needs to wait until writer thread
consumes data from queue.
Web Exercise 2
Please design the user screen for ‘Create Order’ by which user can create buy/sell orders.
Please make sure you are taking care of client side validations
Quantity should be greater than zero
Implement dropdown of order type like Market, Limit, Limit with Condition, Market with
Condition, Limit with Time, Market with Time, Time Out, Special Limit Order and Enhanced
Limit order.
Implement the double submit validation.
Web Exercise 1
Using Any MVC Framework, design and develop UI for User authentication. Please refer
Hibernate Exercise 1.
Please design the user screen for Stock Watch Service. Please refer Hibernate Exercise 2.
Please write JUnit to test the above feature.
TimeOut Order
This order will be treat as a limit order until time specified is occurred. After
specified time it will cancel automatically.
LimitWithCondition
This order will wait in the matching engine for a specific condition to happen
and after that it will become limit order. This order should not execute till
given condition match. User should be able to cancel this order. Condition
like Reliance Share price crossing 95.5
LimitWithTime
This order will wait in the matching engine for a specific time and after that
time it will become limit order. This order should not execute till given time.
User should be able to cancel this order.
MarketWithCondition
This order will wait in the matching engine for a specific condition to happen
and after that it will become market order. This order should not execute till
given condition match. User should be able to cancel this order. Condition like
Reliance Share price crossing 95.5
MarketWithTime
This order will wait in the matching engine for a specific time and after that
time it will become market order. This order should not execute till given time.
User should be able to cancel this order.
You need to write a program which can encapsulating the different type of order execution
logic in an object.
Java 5 – Generics
Write your own map implementation using generics assuming that java does not provide its own
map implementation.
Write a class which is demonstrating Covariance and Contravariance.
Portfolio manager is sending orders with client id. This client id is combined of multiple fields like
ClientCategory(1,2,3)-clientId. Please use Custom user type to build and store these in database.