Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Individual work-no collaboration. 1. Learning Objectives: 1) Use List data structure COS 210 Project 2 Maintaining an Ordered List 2) Use Java.util.Linked List

Individual work-no collaboration. 1. Learning Objectives: 1) Use List data structure COS 210 Project 25) Use Generic types 6) Define classes and create the driver class to test the class definitions 2. General

Individual work-no collaboration. 1. Learning Objectives: 1) Use List data structure COS 210 Project 2 Maintaining an Ordered List 2) Use "Java.util.Linked List " class, "Java.lang. Iterable ", "Java.util.Iterator " and "Java util.Listiterator interfaces 3) Use composition/aggregation relationship between classes 4) Review and use "Java lang.Comparable interface 5) Use Generic types 6) Define classes and create the driver class to test the class definitions 2. General Descriptions: This project uses the "Java util.LinkedList " class to maintain an ordered list so that the elements in the list are in ascending order. 3. Requirements: 1) Create "Ordered List" class that has the following data fields and methods, and toString() method. Data Field Attribute A linked list to contain the data private LinkedList theList Method Behavior public void add(E obj) Inserts obj into the list preserving the list's order public Iterator Returns an Iterator to the list iterator() Returns the object at the specified position Returns the size of the list public E get(int index) public int size() public boolean remove (E obj) 2) Create a driver class to test the Ordered List class-should test all the methods in Ordered List class. When testing add, get and remove methods, should test different cases (access the list in the front/back/middle) and display the list. Removes first occurrence of obj from the list. Returns true if the list contained object obj; otherwise, returns false 4. References: 1) Koffman & Wolfgang, Data Structures. Abstraction and Design Using Java, 2nd Edition: Pages 125-129. 2) Lecture notes. 5. Submission: 1) At least two Java files - OrderList class and the driver class. 5) Use Generic types 6) Define classes and create the driver class to test the class definitions 2. General Descriptions: This project uses the "Java.util.LinkedList " class to maintain an ordered list so that the elements in the list are in ascending order. 3. Requirements: 1) Create "Ordered List" class that has the following data fields and methods, and toString() method. Data Field Attribute A linked list to contain the data private LinkedList theList Method Behavior public void add(E obj) Inserts obj into the list preserving the list's order public Iterator Returns an Iterator to the list iterator() public E get(int index) public int size() public boolean remove (E obj) Returns the object at the specified position Returns the size of the list Removes first occurrence of obj from the list. Returns True if the list contained object obj; otherwise, returns false 2) Create a driver class to test the Ordered List class-should test all the methods in Ordered List class. When testing add, get and remove methods, should test different cases (access the list in the front/back/middle) and display the list. 4. References: 1) Koffman & Wolfgang, Data Structures: Abstraction and Design Using Java, 2nd Edition Pages 125-129 2) Lecture notes. 5. Submission: 1) At least two Java files - OrderList class and the driver class. a. Java files must compile. Grade of zero will be received if the code does not compile. b. The files must have proper comments. Up to 20% of grade will be deducted if no proper comments are provided. 2) Report document including at least your name, description of your project, design idea, the relationship among the java files in your project, sample running results that show different scenarios. Please note: a. If your code cannot complete all the requirements, you need to indicate what you have completed and could not complete. Incomplete work without notifying the instructor may receive zero credit. b. The other references used other than the textbook and lecture notes need to be specified in the report. 3) Grade of zero will be received if no report is submitted.

Step by Step Solution

3.40 Rating (172 Votes )

There are 3 Steps involved in it

Step: 1

It seems you have provided two images containing instructions for a programming project related to maintaining an ordered list in Java The project inv... 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

Step: 3

blur-text-image

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

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions

Question

What was the positive value of Max Weber's model of "bureaucracy?"

Answered: 1 week ago

Question

What impresses you the most about infants abilities, and why?

Answered: 1 week ago