Write a java class

Assignment Help JAVA Programming
Reference no: EM131990

Problem 1. The Queue ADT

A queue is a fundamental abstract data type. It is an ordered collection of items in which the removal of items is restricted to the FIFO ( rst in rst out) principle. That is, the rst item added to the queue will be the rst one removed, the second added will be the second removed, etc. The Queue ADT can be described as follows:

When you are standing in line waiting for a bank teller, you are in a queue of people. The rst in the line is the rst to be served (the rst to be removed from the queue). The next in line is the second to be served (or removed from the queue). Using this understanding of a queue, we will say that items added to a queue are added to the back of the queue (i.e., you go to the back of the line when you add yourself to the line). The word for adding an element to a queue is enqueue. When we remove an item for a queue, we remove it from the front of the queue (i.e., if you are next to be served in the line, you are at the front of the line). The word for removing an item from a queue is dequeue.

Note that front and back are just words that we use to understand what a queue is. It does not necessarily indicate how the data in the queue should be stored (or how the methods are implemented).

Write a Java class called PQueue that extends the provided abstract QueueADT class. Your class will implement a queue of people (objects of the provided Person class). Do not change the Person class or the QueueADT class.

Problem 2:

Draw a picture that reects, in some way, what you did on the long weekend and how it relates to COMP1006/1406 (or computer science in general). You can submit a hardcopy of your picture or you can electronically submit it in a pdf.

You will not be graded by artistic quality. The majority of the mark will simply be for submitting something. To receive full marks the drawing should have some relation to computer science.

Reference no: EM131990

Questions Cloud

Estimate the linear demand equation : Estimate the linear demand equation
Write a program using binary search approach : Write a program using binary search approach
Write a java class : Write a Java class called PQueue that extends the provided abstract QueueADT class.
Data structures and algorithm design : Data Structures and Algorithm Design
Who will be the main actors responsible for innovation : Who will be the main actors responsible for innovation?
Plan for the optimal use of the promotional mix elements : Promotional strategy is a plan for the optimal use of the promotional mix elements.
Impact on the strategies of foreign firms : How are they likely to impact on the strategies of foreign firms

Reviews

Write a Review

JAVA Programming Questions & Answers

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

  Record managing system application

Build a student record managing system application

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Cascading style sheet to a website

Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page.

  Design and implement a small and simple email server

Design and implement a small and simple email server using the concept of web based information system (WBIS).

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  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.

  Create a java program

UserApp and PrettyPrintUtility multiple times (supplying different TransData test file names), the AutoTesterUtility PROGRAM will be the driver program.

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Develop a gui based java program

Designing and developing a College Registration program

  Communication with an smtp server

Develop a graphical user interface based java program that can communicate with a real SMTP email server for sending emails

  Technical community blog

Write a blog article for a coding/technical community blog

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