Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners I couldn't solve it
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


koko
I couldn't solve it
8 Answer(s)      4 years ago
Posted in : Java Beginners


*A customer who wants to apply for getting a car license should provide information about the brand of the car. *Then the customer receives a request ID from the office. *The customer's request (represented by his/her ID) is sent to the specialized employee. *Each employee in the oce is specialized in only one brand. Thus, according to the brand of the car, the request is sent to one of the employees. *After receiving all the requests to be processed, the employee processes them and sorts them according to the request IDs, since the customer with smaller request ID will receive his license earlier than the one with higher request ID. *When a customer arrives to receive his/her license, s/he is directed to the specialized employee(according to the brand of the car being licensed). S/he is also assigned a turn to receive his/her license according to the assigned request IDs. To simulate the described process, you are required to implement the following: Class LicensingOffice which keeps track of the employees in an array data structure. It is initialized by passing the number of employees working in the office. Provide the class with the following methods: * void addEmployee(String brand) that inserts a new employee into the array, after specifying the car brand that he serves as input to the method. * int LicenseApplication(String brand) that assigns the customer a request ID and passes his request to the correct employee to be processed (depending on the car brand). The method will return -1 in case that the brand is not served at the office or the employee serving the brand cannot accept more licenses for the day. * void processDayRequests()that orders the employees to start processing the requests they have. * int[]recieveLicense(String brand,int reqID)that returns an array of two items. The first item is the number of the employee who serves the brand (his index in the array of employees). The second one is the turn of the customer request at the employee. The method returns null if the customer request is not found as a processed request.  Class Employee with attributes representing the car brand that this employee serves, the requests that s/he has received but has not been processed yet and the processed requests, sorted according to the request ID. Each employee has a maximum number of 50 requests that s/he can process per day. Provide the class with the following methods:  void newRequest(int requestID) which takes as input the ID of a request and adds this ID to the unprocessed requests of the employee.  void processRequests() which handles all the unprocessed requests, by moving them to the data structure holding the processed requests.  int getTurn(int requestID) which takes as input the request ID and returns the turn of the customer with this ID, given the fact that those with smaller request IDs are served first.  Class Customer with attributes representing the car brand, request ID, the ID of the employee who will serve him and his turn to be served by this employee. Note that not all the attributes are known by the customer. Some of them will be assigned by the licensing office whenever s/he applies for the license. Provide the class with the following methods:  void applyForLicense() that simulates the user application for a license. This method should set the value of the attribute representing the request ID.  void recievalTiming() that simulates the receiving process by setting the values of the attributes representing the ID of the employee who will serve the customer and the customer's turn. Note that all customers will head to the same licensing office.  A main method to test the class by simulating a minioofice with 3 employees and 7 customers. The three employees serves the brands Mercedes,Opel and Volks Wagen. The seven customers submits their application in the following order Mercedes owner, Volks Wagen owner, Mercedes owner, Opel owner, Volks Wagen owner, Opel owner, Mercedes owner. Your main method should print the attributes of each customer after the receiving his/her license. You are only allowed to use arrays in the class Office. In the other classes, you can only use instances of StackObj, QueueObj and PriorityQ.


Advertisement
View Answers

November 1, 2010 at 6:52 PM


Sorry for not posting my problem,I couldn't understand how to link between Stacks and Queues in this problem and I also don't understand the concept of the priority of Queues I mean that the priority here is the car brand or another hey???



November 10, 2010 at 3:31 AM


where did u found this problem please ??



November 10, 2010 at 10:53 PM


why are you asking? anyway I want to be well practised so when I searched for online problems I found it posted so I just want to know its answer.



November 10, 2010 at 10:54 PM


so please can you explained to me ???



November 11, 2010 at 4:40 PM


i am trying to solve it but i fail everytime ... so i would like to know where you found it cause my Teacher assistant gave us this problem and told us to solve it and its toooo difficult :S :S and i am sure he copied it from some place .... if you can help me with where you found it maybe it will help me to solve it :S and i will send u the solution .... :S i spent a whole day trying to solve it but i still fail



November 11, 2010 at 4:55 PM


i will write to you an explanation as soon as possible today



November 11, 2010 at 8:03 PM


I found it on a site but I don't remember its name exactly :S pls try to help me because I have an exam on Saturday and I am sure that the exam will include a problem that will be similar to it



March 17, 2012 at 12:20 AM


where is answer ??



Related Tutorials/Questions & Answers:
I couldn't solve it
I couldn't solve it  *A customer who wants to apply for getting a car license should provide information about the brand of the car. *Then the customer receives a request ID from the office. *The customer's request (represented
Exception "Couldn't load database driver: com.mysql.jdbc.Driver". I
Exception "Couldn't load database driver: com.mysql.jdbc.Driver". I  I m trying to connect to mysql from netbeans 6.9 but i m getting this exception "Couldn't load database driver: com.mysql.jdbc.Driver". I ve added the connector
Advertisements
i dont no how to solve it pls
i dont no how to solve it pls   Calculate and display the sum of all prime number from 1 to 100 covert in java system codes
i need help to solve this problem
i need help to solve this problem  Write a stack class ArrayStack.java implements PureStack interface that reads in strings from standard input.... H and I join the queue h. G leaves the queue i. H and I leave the queue
how do i solve this problem?
how do i solve this problem?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access
how do i solve this question?
how do i solve this question?  1.Define a class named Circle with the following properties: a) An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier
how should i can solve
how should i can solve  Web based program - Input - Person's contact details with Passport Number as Unique Key. Save data in to oracle / MySQL. Output - List of Persons saved in the database. Technology to be used - JSP
Solve it
Solve it  How to calculate the value which contains oparator and operand both using command line argument
solve this
solve this   Create a student class. The student object should have studentid, studentname, subject and marks as properties. Also generate the getter and setter methods. Create 5 objects of this class and populate values
please help me solve this problem when i am create database connection using servlecontext
please help me solve this problem when i am create database connection using servlecontext  hi... I have create a database connection using servletcontext . in this code when i login first time it will exceute sucessfully
solve this pbm
solve this pbm  sir rows are also inserting i have checked in the database also the rows are not affected in the table . The first pbm wich i have sent to you is not yet solved.......... pls give me detail explaination how we
solve this pbm
solve this pbm  its not working the code for databae access using servlets
how to solve
how to solve   log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources). log4j:WARN Please initialize the log4j system properly
solve this problem
solve this problem  I typed this program and compiled.The program is compiled but when i eneterd url in tomcat server. Its not giving error but only...)"; int i = statement.executeUpdate(query); if(i!=0
how to solve this..
how to solve this..  Given a list of students and their marks Name | Science | Math | English | Computer Ahmad | 28 | 100 | 66 | 34 Samad | 56 | 89 | 55
how to solve this..
how to solve this..  Given a list of students and their marks Name | Science | Math | English | Computer Ahmad | 28 | 100 | 66 | 34 Samad | 56 | 89 | 55
Solve Program - Java Beginners
Solve Program  Write a progaram in java to display all odd number...[]){ for(int i = 1; i<=100; i=i+2){ System.out.print(i...{ public static void main(String[] args){ try{ for(int i = 1; i<=100
A Program To Solve In Java
A Program To Solve In Java  x!/x+(x+2)!/x+(x+4)!/x ... (x+n)!/x
plz solve my query?
plz solve my query?  how to remove all the options from select control in html using java script?   JavaScript remove all items <...) { var i; for(i=selectbox.options.length-1;i>=0;i--) { selectbox.remove(i
to solve the error - Java Beginners
to solve the error  class bubbleSort1{ public static void...++) { // count how many times // This next loop becomes shorter and shorter for (int i=0; i < n-pass; i++) { if (x[i] > x[i+1]) { // exchange elements int temp
solve it - Java Beginners
solve it  Hi friend, I want to use switch case in jsp please let me know how to call page in jsp using include tag i want call this file...")!=""){ for(int i=0; i<request.getParameter("num").length(); i++){ char value
Solve it - Java Beginners
Solve it  Hi Friends, Thanks for continue reply.. I have some query please solved...its urgent.. I have two table,emp,exam.both have e... is completed,but i want this information display in trainee section i want login type
Solve this problem plzzz
Solve this problem plzzz  Prashant.jsp (this is my JSP file) <... Prashant /Prashant.jsp i want my jsp file should ask for 2 inputs (2 text boxes) and 1 button(submit button) when i put 2 numerica value
ArrayList question plz solve it
ArrayList question plz solve it  An arraylist object stores an Emp Object, where there is name,age,address of the employee is stored, And i want...","Mathura",25)); list.add(new EmployeeData("I","Delhi",23)); list.add
help me to solve this question
help me to solve this question  Write a program that inputs a series of integers into an array. The numbers are in the range 0 to 100. Calculate and display : a) The Largest number b) The Smallest Number c)The sum of the numbers
solve my question shortly
solve my question shortly  <html> <head> <script>.... I have corrected your errors now you can run your code easily. I have also made changes in the calling of your method i.e. in place of textbox event I have
how to solve an internet connection problem
how to solve an internet connection problem  when i run my application it give me this error: Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not yet implemented the problem is that i don`t know
please solve this program
please solve this program  Build a package EMPPACK that contains one stored function Validatesal() and two stored procedures Insertemp() and Getempdetails().The Insert_emp() procedure inserts a particular employee
please solve the programme
please solve the programme  Develop a java program to find the roots of a quadratic equation ax2+bx+c=0, with the following specification :- Class name :- Quad Data members float a,b,c,d, with a,b,c are the co-efficient
help me to solve this problem..
help me to solve this problem..  Given below is a class definition for Book. Type and compile the class, and answer the following questions: class Book { String title; //bookâ??s title double price; //bookâ??s price
Advertisements
 

 

 

DMCA.com