Write the linked list skeleton program with given data

Assignment Help JAVA Programming
Reference no: EM132103965

Problem : The main program (anotherList) and the linked list skeleton are appended to this document.

We would like to model a shopping list. The main program (provided) allows the following operations:

1. Quit

2. Output the list

3. Buy an item (Add an element to the list)

4. Discard an item (Remove an element from the list)

5. Check whether an item was bought (Does the list contain the item)

6. How much have I spent (Total)

The skeleton class (LinkedList1 show the major operation to be implemented. That is:

1. public void addToStart (String itemName, int itemCount)

a. itemName: grocery item

b. itemCount: item price

2. public boolean deleteNode (int i)

a. i: position of the item on the list to be deleted

b. returns true if deleted, false otherwise

3. public int size( )

a. returns the number of elements in the list

4. public int total( )

a. returns the sum of all the itemCount in the list

5. public int find (String target)

a. target: itemName to look up

b. returns 0 if item is not on the list, or the position number if found

6. public void outputList ( )

a. outputs the information of all nodes in the list

Testing (sample) - You need to think about other examples to demonstrate that your implementation works.

Test your program to show that it works on the following operations:

1. Output the elements of the list

2. Add an element (use several possibilities)

3. Remove an element (use several possibilities)

4. Output the size of the list

5. Find an element (use several possibilities)

Deliverables

6. Name you program asg1-Problem02-your-id (e.g., asg1-2011300912)

7. Source code: zip file of your project

8. Test runs: copy of your runs

NETBEANS - JAVA

Reference no: EM132103965

Questions Cloud

Write code that produces 10 dashes of length : Write code that produces 10 dashes of length (and gap) 20. Define a fuction dashes() that draws multiple dashes and takes 3 parameters.
Find the magnitude of the net torque applied : With respect to the z axis, find the magnitude of the net torque applied to the rod.
Determine the magnitude of the net electric field : Determine the magnitude of the net electric field that exists at the center of the square.
Write a program that print the four-digit pin number : Write a program that prompts the user to enter a three digits number then form and print the four-digit pin number.
Write the linked list skeleton program with given data : Discard an item (Remove an element from the list). Check whether an item was bought (Does the list contain the item)
What is the motorcycle average speed : Starting from rest a motorcycle increases its speed to 27.2 m/s at a constant rate for 4.0 seconds?
How many blocks of main memory are there : Suppose a computer using direct mapped cache has 232 bytes of main memory and a cache of 1024 blocks, where each block contains 32 bytes.
What velocity would you need to shoot the ball into bucket : What velocity would you need to shoot the ball into the bucket? Note that the launch angle (?) was 27.5°
Transform the loop by unrolling the loop and reschedule : Consider the following code and answer the following questions. Note that F2 register holds a scalar constant that cannot be changed for the computation.

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