Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Suppose a business person launches new cinema at Islamabad and ask his team to develop a ticket system for box office. He assigns some requirements about system that how should it work. The requirements are such a way that there are only '5' number of box office windows in the theatre. Each window can have at max '20' number of people waiting in line. To start with, only one window is opened. If the number of people waiting in line in that window exceeds 20, then the next window is opened and people can join the line in that window. Likewise, if both the first and second windows have n number of people waiting in each queue, then a third window is opened. This can go on until the maximum number of windows w is reached. Let us assume that once a window is opened it never closes. A new window is only opened if all open windows are full. Each person can buy only one ticket. So, the system should not allot more than one ticket per person. Let us assume that the system issues one ticket each across all open windows. When a ticket is issued, the count of the number of people in each open queue is reduced by 1.

When a new person has to join the queue, the system has to prompt him to join a queue such that they are issued a ticket as fast as possible. The system prompts the person based on these factors: o First it looks for an open window with the least number of people and prompts that window number. If more than one window has the least number of people, then the system can prompt the person to join the first window (smaller window ld) it encounters with the least number of people. If the queues of all open windows are full and a new window can be opened, then the new person is prompted to join the new queue for the new box office window. O If all queues for all windows are full, a corresponding message is displayed. That person need not be considered in the next iteration .After a queue is prompted to a person, the person or system cannot change the queue.

Implement the system based on above scenario in java using suitable data structure.



Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a

number is the product of that number multiplied by each positive integer lower than it. For

example, 4 factorial is 4 * 3 * 2 * 1, or 24.


One large chemical company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9 percent of $5000, or a total of $650. Develop a java program inputs each salesperson's gross sales for last week and calculates and displays that salesperson's earnings. Process one salesperson's figures at a time


write a java code that print the largest number of an array,


write a java code that declare an array which has 8 different numbers. Print the numbers of that array in reverse order.


Print the largest number of an array,


Write down a java program which will print a staircase pattern of * with 10 levels.


Write a java code that finds out the area of three geometric shape: Circle, Triangle, Square. Give the user an option to select which geometric shape's area he/she wants to find out. Based on the choice take necessary input and find out the result. Use different area method for each geometric shape. Print the result in main method.


Create a Javascript program in which a food processing company buys plastic bottles for its products. A plastic manufacturer sells bottles at a price of 85 cents each bottle, if the company orders 1000 bottles or more. Otherwise the price per bottle is 90 cents. How much the company would pay for both cases. 


Given a 2D (2 dimensional) array, find the largest element in it. 

 

Write a solution that accepts a 2D-array A and two integers M (number of rows) and N (number of columns). The output is the largest element in an array. 

 

Input 

    2 

    3 

    1 4 5 

    2 3 0 

    

    Where, 

  • The first line represents the number of rows. (M) 
  • The second line represents the number of columns. (N) 
  • The third line represents an array of elements of the 1st row and so on. 

 

Output 

    5

*In Java


LATEST TUTORIALS
APPROVED BY CLIENTS