Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Okay so I already completed steps A - C listapi is now a library for project 5 the trouble I am having trouble with is

Okay so I already completed steps A - C listapi is now a library for project 5 the trouble I am having trouble with is how to implement part 5 like how do you access that external library

Use ListAPI as a library.

a) Create a NetBeans project and name it p5_2_your-id.

b) Create a JAR file of ListAPI.

Download ListAPI.zip from Moodle and extract the NetBeans project folder ListAPI from the archive file.

In NetBeans, open ListAPI. Under the Project tab, right click on ListAPI and select Clean. Under the Project tab, right click on ListAPI and select Build. The created jar file is in dist folder.

Move the JAR file to the folder that contains your project folder. Navigate to the ListAPI NetBeans project folder and open it. Open the folder dist. Copy the file ListAPI.jar and paste it in the same folder that contains the p5_2_your-id project folder.

c) Attach the ListAPI.jar to your project.

Under the NetBeans Project tab, open the project created in step (a).

Right click on Libraries and select Add JAR/Folder..., and then navigate to ListAPI.jar. In the Add JAR/Folder dialog box, select ListAPI.jar, select Relative Path (which, if you have followed the preceding instructions, will be ../ListAPI.jar) and click OK.

The classes in the JAR file are now available either by adding the following import statement to classes in your project

import listapi.*; 

or by entering the full name of a class as in the following example.

 listapi.TestGenericQueue tgq = new listapi.TestGenericQueue(); 

d) In your project p5_2_your-id, add code to enqueue 5 integer values in a listapi.GenericQueue, displaying the queue as each value is added. Then, dequeue each element in the queue, adding each value to a listapi.GenericStack, displaying the queue and stack as each value is moved from the stack to the queue. Finally, pop all values of the stack and add them to a listapi.MyArrayList, displaying the stack and the list as each value is moved from the stack to the list.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

Students also viewed these Databases questions

Question

9-6. Why is offshoring controversial?

Answered: 1 week ago

Question

=+C&B (especially taxation) laws, regulations, and practices?

Answered: 1 week ago

Question

=+designing international assignment C&B packages.

Answered: 1 week ago