Make a program in java language with classes

Assignment Help JAVA Programming
Reference no: EM13329405

Program in JAVA language

Consider an health attending service where attending is made in 3 assistance counters, numbered 1 to 3. Users have 4 types of tickets to pick by attending order:

Ticket A - Health Consulting

Ticket B - Exams

Ticket C - PaymentS

Ticket D - Health appointments

Services A and B - take 2 minutes to finish.

Services C and D - take 5 minutes to finish.

Distribution by assistance counters:

1 - Tickets A and B

2 - Ticket C

3 - Ticket D

However, when more than 3 users are in a queue for the same assistance counter, the other assistance counters must attend them by order.

Objective of this work:

Make a program, in JAVA language with classes, that simulates health attending in one business day, according to the information just given.

Program must have an input, from keyboard or file (type of input detected by the system), with a set of rows (lines), with the following format:

hh:mm:ss Xddd

hh - hours

mm - minutes

ss - seconds

X - type of ticket (A, B, C or D)

ddd - number of ticket (001, 002... and so on)

We can also have 2 more commands:

hh:mm:ss queue - show how many tickets are in queue waiting for attend.

hh:mm:ss mean - mean of user's waiting time till be attended.

Example for this lines:

9:15:00 ticket C020

9:15:10 ticket C021

9:15:30 ticket C022

9:15:55 ticket C023

9:16:10 ticket A015

9:16:30 ticket C024

9:17:00 ticket C020 -> assistance counter 1

9:17:00 ticket C021 -> assiscante counter 2

9:17:00 senha C022 -> assistance counter 3

9:22:00 senha A015 -> assistance counter 1

9:22:00 senha C023 -> assistance counter 2

If command 9:23:00 queue was inputed, answer would be:

9:23:00 Tickets waiting: 1 -> C024

If command 9:23:00 mean was inputed, answer would be for:

ticket C020: 120 seconds.

ticket C021: 110 seconds.

ticket C022: 90 seconds.

ticket A015: 350 seconds.

ticket C023: 365 seconds.

So, mean would be (120+110+90+350+365)/5 = 207 seconds = 3 minutes and 27 seconds.

So the answer would be:

9:23:00 Mean waiting time: 3m 27s.

Work must have compressed file with:

_Files *.class (bytecode)

_Files *.java

_Readme txt file with information about how to execute the program.

Reference no: EM13329405

Questions Cloud

Explain what is the mass of agcl preciptate : If 30 ml of 0.150M cacl is added to 40ml of 0.1 M AgNo3. What is the mass of AgCl preciptate
Discuss the internal and external environment : Discuss the internal and external environment of an organisation using relevant examples.
How could german or british investment be hurt by largeu.s. : It is possible for U.S. federalbudget deficits to crowd out investment spending in othercountries? How could German or British investment be hurt by largeU.S. budget deficits?
Explain what percentage of the ca2 can be separated : What percentage of the Ca2 (aq) can be separated from the Ag (aq) by selective precipitation? hint: Ksp for Ag2SO4 is 1.20×10^-5 Ksp for CaSO4 is 4.93×10-5
Make a program in java language with classes : Make a program, in JAVA language with classes, that simulates health attending in one business day, according to the information just given.
Should the company continue to manufacture : Should the company continue to manufacture the part, or should it buy the part from the outside supplier? Support your answer with analyses - requires a future outlay of cash and is relevant for current and future decision making.
Explain what is the percent by mass of ba : A sample of 0.836 gm of unknown compound containing barium ions Ba2+ is dissolved in water and treated with an excess of Na2So4. If the mass of BaSo4 precipitat formed 0.7403 gm, what is the percent by mass of Ba in the orginal unknown compund
Building a commercial complex in the heart of the city : Your organisation is bidding for a construction project, which consists of building a commercial complex in the heart of the city. Your organisation has worked on a similar project that was one-third the size of this one but completed it with a cost ..
Determine what is the yield on the repurchase agreement : A bank enters a repurchase agreement in which it agrees to buy Treasury securities from a correspondent bank at a price of $19,945,000, with the promise to buy them back at a price of $20,000,000.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd