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

  Dangerousmonster which inherits the monster

An interface - DangerousMonster which inherits the Monster interface and has a method called destroy() with void return type.(Note: Just like a class can inherit from another class, an interface can inherit from another interface using the "extends..

  Variable is named res and is used to input a resistanc

Assume the existence of the following Java GUI application. There are two text fields for user input. The first JTextField variable is named res and is used to input a resistance value in ohms. The second JTextField variable named cap is used to..

  Write java program which will permit user to make selection

Write the Java Program which will permit the user to make selection. You will present user with two options to perform, then you will perform action selected by user.

  Java program to store temperatures in two-dimensional array

Write the Java program which uses two-dimensional array to store highest and lowest temperatures for each month of the year. Program must output average high,average low,

  Java tv''s newest owner! java tv is the greatest tv channel

Java TV's newest owner! Java TV is the greatest TV channel ever, and it prides itself in its 24 hour interesting ' programming'. To help you run this channel you will need to write a  dynamic  program that uses  Data Lists  to store all its TV show i..

  Program that computes and prints the value of 6!/5! using

Write a Java program that computes and prints the  value of 6!/5! using Scanner.

  Be sure to show all declarations

Write a function call that invokes function a. Be sure to show all declarations. However a complete main is not required.

  Write a recursive instance method

Write a recursive instance method

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Rewrite this code in order to ask the user for input

rewrite this code in order to ask the user for input and then coverth it from infex to postfix ,, so i want to put a Scanner and this ask the user for input .. how to do it ?

  String as its parameter and returns the length

Write a method named longestWord that accepts a String as its parameter and returns the length of the longest word in the string.A word is a sequence of one or more non-space characters (any character other than the space character).

  Compute the correct number of square feet needed

The Carpet House owner wants to put a carpet calculator on his website so that visitors can estimate the amount of carpet they will need to purchase.

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