Write program that uses a linkedlist object to store a list

Assignment Help JAVA Programming
Reference no: EM131463505

Assignment

1. Write a program that uses one of the Map classes to implement a contact list. Contact information should include first name, last name, a phone number and an email address. The list should be stored on your computers file system and entries sorted alphabetically according to a person's last name. The program should prompt the user for the name of the file where the information is stored, and allow the user to add a contact from the list, delete a contact from the list, and display the entire contact list. This program counts 65% of the Correctness grade.

2. A print queue is a list of documents, called jobs, waiting to be printed. Each job is assigned an integer job number and an estimated print time, in seconds. If a job arrives and the printer is currently printing another job, the job waits in the print queue. This type of waiting line is called a first-in-first-out (FIFO) or first-come-first-serve (FCFS) waiting line model or queue. The Java LinkedList class is a pretty good class for implementing a waiting line model like this in code.

Write a program that uses a LinkedList object to store a list of print jobs in a FIFO queue. We will assume that each job has a unique job number that is assigned sequentially, and that the print time is randomly distributed between 10 seconds and 1000 seconds. These two data elements should be defined as part of a Job class. The program should prompt the user to either add a job to the queue or to quit. When a user adds a job, the program assigns a job number and randomly generates a print time for the job. When the user quits, the program will display the jobs (i.e., the job id and print time) in the queue, in the order in which they were added.

For this exercise, you can use the java. util. Random class to generate random numbers, as follows:

Random rnGenerator = new Random( rnSeed ); // creates a Random object

printTime = rnGenerator .nextInt (991) + 10; // next int in range 10-1000

The first statement above instantiates a Random object called rnGenerator. The constructor argument rnSeed is called a random number seed. It is of type long, and is used to help ensure that the same sequence of random numbers is generated each time the program is run...which is helpful for test purposes. The nextint ( ) method returns a random integer in the range 0 to 999.

Reference no: EM131463505

Questions Cloud

Discuss which sites you think work well and which do not : An interesting approach taken by Yahoo.com and several other websites is to provide viewers with the tools needed to create a personal Web page or community.
Solve approximately the two variable problem : describe how solving problem can be reduced to solving a two variable unconstrained optimization problem.solve approximately the two variable problem
What data structures are supported by the library : What data structures are supported by the library? What types of data are recommended for use with each data structure object?
Describe your self-assessment in a written report : Firms today expect employees to be proficient in using computers and computer software. Typical business applications include e-mail, word processing.
Write program that uses a linkedlist object to store a list : Write a program that uses a LinkedList object to store list of print jobs in FIFO queue. Write program that uses one of Map classes to implement a contact list.
What purpose do audits and gaaps serve in business world : What purpose do audits and generally accepted accounting principles (GAAPs) serve in today's business world? How do the major provisions of the Sarbanes-Oxley.
Determine which research method seems the most applicable : Analyze the various research methods employed in psychology to determine which research method seems the most applicable .
Describe the functions the system should perform : Describe the functions the system should perform. This section should list the requirements of the system in sufficient detail to allow a design team.
Case study-turnaround at the preston plant : Case study-Turnaround at the Preston Plant-Analysis of the quantitative tools and techniques and A brief summary of the challenges faced

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