java priority q assignment

Closed Posted Dec 1, 2015 Paid on delivery
Closed Paid on delivery

This programming assignment will allow you to exercise inheritance and polymorphism in the Java language and also get a feel for using interfaces. You will develop a new derived class from the base class BaseContainer (stored in the [login to view URL] in a new window file) and use that class along with the two already provided through the ArrayList object in the Driver program that is also included in the zip file.

Since Java supports a universal, ultimate base class, Object, for all classes defined in the Java language, you will often use inheritance and polymorphism implicitly by overriding methods of Object. Most often, you will override the Object methods equals() and toString() to perform operations appropriate for your class.

Note: The file [login to view URL] contains strings that will be loaded by your program. The file must be placed in the 'current' directory in order for it to load. If running from Eclipse that means the project directory (e.g. Assignment4) where your src directory exists.

The assignment

You will create a new derived class: MyPriorityQ<T extends Comparable<T>>. This class inserts objects into the container in priority order as determined by the compareTo() method. Since our container classes only support classes which implement the Comparable<T> interface, the compareTo() method will be defined for type of object (T) we can store in our containers.

The call [login to view URL](T c2) method returns the following:

<0 if c1 is less than c2;

0 if c1 is equal to c2; and

>0 if c1 is greater than c2

Object priority in your MyPriorityQ class will be based on the comparisons defined above where:

negative return indicates c1 is of higher priority that c2;

a zero returns indicates that c1 and c2 have the same priority;

and a positive return indicates c1 is of lower priority than c2.

The MyPriorityQ class add() method adds objects to the queue in order high to low priority and the remove() method always returns the highest priority object in the queue. (Hint: Priority in the case of strings is alphabetical order - the lowest item in dictionary-order is the highest priority item.)

You will also define and implement a method

public boolean equals(BaseContainer<T> b)

in the class BaseContainer, which returns true for [login to view URL](b2) if

the size of b1 equals b2 and the two containers contain objects with the same values in the same order; or

if b1 and b2 are the same container object.

Java

Project ID: #9021374

About the project

21 proposals Remote project Active Jan 8, 2016

21 freelancers are bidding on average $26 for this job

it2051229

Hi, I have read the requirements and I would like to do this project if given the opportunity. I am a computer science practitioner and having the "Java and Algorithms Certification Badge" in my profile gives me confid More

$30 USD in 1 day
(1072 Reviews)
7.6
eperfections

I am TOP RANKED Java Programmer. I am very interested in your project. Please award me this project. Thanks

$30 USD in 1 day
(441 Reviews)
7.4
AhmedLabib93

Hello My name is Ahmed, i passed freelancer java exam with top 10% rated plus i got 2 java certificate 1Z0-803 and 1Z0-804 with 3+ years experience. small overview of feedback on my profile “professional , the be More

$40 USD in 1 day
(404 Reviews)
6.6
quanlitysource

A proposal has not yet been provided

$30 USD in 1 day
(89 Reviews)
5.8
florinbacu

A proposal has not yet been provided

$25 USD in 1 day
(15 Reviews)
6.0
szymszteinsl

Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !Ready !R More

$50 USD in 1 day
(53 Reviews)
5.9
akshayatm

Hey. Hi I am an exrperienced java developer equipped with core java j2ee. Pls contact for further discussion.

$25 USD in 1 day
(56 Reviews)
5.3
Javagurupk

A proposal has not yet been provided

$21 USD in 1 day
(62 Reviews)
5.5
cimemi

Hi, I am a software engineer experienced in Java (I am using Eclipse Juno). I can complete your projects within one day from awarding, properly tested and commented. Looking forward to hearing from you.

$25 USD in 1 day
(27 Reviews)
4.9
jeremykwgacc

A proposal has not yet been provided

$10 USD in 3 days
(4 Reviews)
2.1
mikekarrys

I have a lot of experience with using queues and arrays. Let me do your project and you will not be disappointed. Please contact me and we can discuss the project in more detail.

$55 USD in 1 day
(1 Review)
0.7
alpnabansal10l

I have good knowledge of JAVA and OOP concepts. I have more than 8 years of experience working with top software giants in the industry. If provided the chance, I can finish the task on time with perfection

$20 USD in 1 day
(1 Review)
0.4
avni2sharma1985

Hi Sir, I am trying to setup as a freelancer. I have worked with Top MNC's working on Telecom and Networking Projects on Linux Platform. I have 8 years experience in C/C++/JAVA programming in development only and More

$25 USD in 1 day
(0 Reviews)
0.0
keshav4248

I am glad to offer myself for this job. I read brief about your project description. I have more information and questions ready to share via personal message. Please start chat now for more information, proposal and More

$20 USD in 1 day
(0 Reviews)
0.0
sandy22021987

I am a Software Engineer with 2 years experience working in Infosys Limited(India's Biggest IT Business Company). I am new to freelancer.in, although I have worked on upwork. I will do it in 1 day as I am an expe More

$25 USD in 1 day
(0 Reviews)
0.0
KanashVlad

A proposal has not yet been provided

$15 USD in 1 day
(0 Reviews)
0.0
swathi0819

I have very good experience in java and J2ee. I have worked for various projects on various technologies. I have strong communication and requirement analyzing skills.

$29 USD in 4 days
(0 Reviews)
0.0
Audigier

Hello, I am ready for this. The description just looks as if you have already given the specifications. Please let us talk more if there are additional specifications you need to give me. Thank you.

$20 USD in 1 day
(0 Reviews)
0.0
rcallow

- Several years worth of industry experience working with Java projects. - Bachelor of Computer Science. - Thorough understanding of object oriented programming. I am keen to take on a new project, in the hope of More

$10 USD in 1 day
(0 Reviews)
0.0