Individual work-no collaboration. 1. Learning Objectives: 1) Use List data structure COS 210 Project 2 Maintaining...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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<E>" class, "Java.lang. Iterable<E>", "Java.util.Iterator<E>" and "Java util.Listiterator<E> 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<E>" 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<E> 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<E>" 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<E> 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. 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<E>" class, "Java.lang. Iterable<E>", "Java.util.Iterator<E>" and "Java util.Listiterator<E> 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<E>" 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<E> 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<E>" 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<E> 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.
Expert Answer:
Answer rating: 100% (QA)
It seems you have provided two images containing instructions for a programming project related to maintaining an ordered list in Java The project inv... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
A barge floating in fresh water ( = 1000 kg/m 3 ) is shaped like a hollow rectangular prism with base area A = 550 m 2 and height H = 2.0 m. When empty the bottom of the barge is located H 0 = 0.45 m...
-
22. In an experiment to find the range of -particles in air, the apparatus below was used. -particle source detector ruler The results of this experiment are shown below. count rate /(counts/minute)...
-
The second programming project involves writing a program that examines a file of polynomials and determines whether the polynomials in that file are in strictly ascending order using two different...
-
Consider a regulators objective formulized as: (a) Show that at most one of the four constraints (incentive compatibility and participation) can be binding in this case, that the high cost firms fee...
-
Two capacitors when connected in parallel give an equivalent capacitance of Cp and an equivalent capacitance of Cs when connected in series. What is the capacitance of each capacitor?
-
An alternator supplies a peak current of 4.68 A to a coil with a negligibly small internal resistance. The voltage of the alternator is 420-V peak at 60.0 Hz. When a capacitor of 38.0 F is placed in...
-
With reference to Exercise 10.55, find a large sample 95% confidence interval for the true difference of probabilities. Data From Exercise 10.55 10.55 As a check on the quality of eye glasses...
-
The Sports Shoe Company is a manufacturer of basketball and football shoes. The manager of marketing must decide the best way to spend advertising resources. Each football team sponsored requires 120...
-
Suppose you observed that one-year T-bills are trading with a yield to maturity (YTM) of 4.75%. The yield spread between AAA and BB rated corporate bonds is 130 basis points. The maturity yield...
-
Prepare general journal entry. Billy Bob's Bikes Transactions Nov. 1: Billy Bob paid in advance for an 8-month insurance policy, which will begin today. He paid $3,856 cash for the policy. Nov, 1-...
-
Companies must always try to strike a balance between effectiveness and efficiency because Effectiveness and efficiency are the measure of the organization's performance Effectiveness is only...
-
Page > of 3 MP 4: Lorenz Curve, Gini Index, Robin Hood Index Economists have long used mathematics to study the distribution of wealth in societies. Of particu- lar interest is how the wealth...
-
Please answer the tasks below in as much detail as possible and attach all completed evidence to this workbook. Tasks 1-Identify customer preferences (PC1.1, PC1.2, PC2.2, PE1,KE1, KE5, KE6) Identify...
-
Solve 3 5 1 for y. X Y 4
-
IV a) let at time "t" the instantanioun position, relocity and acceleration of spiderman w.mt net is x(+), x' (+) and x' (+) respectively. hence, we must have m(t) + kx(+) + 8 X (1)=0 where: ma mass...
-
Discuss how do airplanes fly upside down if it's the shape of the wings that make them fly?
-
According to a New York Times columnist, The estate tax affects a surprisingly small number of people. In 2003, . . . just 1.25 percent of all deaths resulted in taxable estates, with most of them...
-
Francis B. Freeman, Jr., (plaintiff) appeals a judgment for Mary Ann Barrs (defendant) in an action plaintiff brought to replevy [recover] a cattle scale. * * * In 2005, defendant purchased a tract...
-
Jones bought a used car from the AHerts Car Rental System, which regularly sold its used equipment at the end of its fiscal year. First National Bank of Roxboro had previously obtained a perfected...
-
Mark Womer and Brian Perry were members of the U.S. Navy and were stationed in Newport, Rhode Island. On April 10, Womer allowed Perry to borrow his automobile so that Perry could visit his family in...
-
Using the data in exercise 2, determine how many units of resources the firm will want to acquire. Data from in exercise 2 Using the information in the following table, calculate the marginal revenue...
-
What does it mean to say that the demand for resources is a derived demand? Is the demand for all goods and services a derived demand?
-
Using the information in the following table, calculate the marginal revenue product (MRP = MPP MR). Unit of Resources Total Resource Output Price Price 1 10 $5 $10 2 25 $5 $10 345 35 $5 $10 40 $5...
Study smarter with the SolutionInn App