Write program that uses a linkedlist object to store a list

Assignment Help JAVA Programming
Reference no: EM131323857

Assignment: Introduction to Programming Using Java

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 computer's 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.

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( 1000 ) + 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: EM131323857

Questions Cloud

Write the paper on domestic violence : Write the given paper assignment.- The topic is: "Domestic Violence: The After-Effects."- Also provide the Thesis statement.
Calculate the molarity of solution : Dr. Pepper has 40.0g of sugar per 12 oz. of liquid. Calculate the molarity of this solution. Put that molarity into your regression line and calculate the density (all other things being equal) of this sugar solution. Show your work
Probelm regarding the buffer solution : What mass of NaH2PO4 must be added to 1.20 L of 0.20 M Na2HPO4to make a buffer solution whose pH=6.90? pKa2(H3PO4)=7.21.
Why does the temperature of a solution increase : Why does the temperature of a solution increase if the reaction is exothermic? For example, in the precipitation of silver iodide, delta H is -110.7 kj. Why is this reaction exothermic and why does it cause the solution temperature to increase?
Write program that uses a linkedlist object to store a list : 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..
Determine the mass of glucose : Determine the mass of glucose, C6H12O6(s), needed to produce a 0.150m glucose solution in 50.0mL of C2H5OH(l), density 0.789g/mL
Frequency of the first harmonic on the string : Consider a string with a length of 54.5 cm tied at both end (like on a stringed instrument). If the frequency of the first harmonic on the string is 256 Hz, determine the speed of the wave in the string. Post your answer in m/sand with 3 significa..
In what ways are worldviews and ethics related : According to your textbook readings, what dynamics exist between an ethical system and the underlying worldview (comprising people's assumptions, beliefs, and actions about reality)? In what ways are worldviews and ethics related? Cite your source..
Frequency of the third harmonic for the pipe : Consider a pipe with a length of 43.5 cm. If the temperature of the air is 19.5 oC and the pipe is closed in one end and open in the other, what is the frequency of the third harmonic for the pipe? Post your answer in hertz (Hz) and with 3 signifi..

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