Take your class and its multiple subclasses. Read in a set of s. This set should...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Take your class and its multiple subclasses. Read in a set of s. This set should contain some (but not all) duplicate elements. Store the s in sorted order in a doubly-linked list of s based on the GDLL class from the previous homework. The sort key should have two levels. The first level should be a identifier and the second key should be something else. You may modify the GDLL class as you see fit to help you do this. If you run across an in the set you read from, and that is already in the doubly-linked list, delete that before going on to add/delete later s. Print the doubly-linked list after each addition and deletion. Details: Your input file should be either entered from your main program or a separate text file. I will test with your file in the order you have the s, and I will also permute your inputs to see that it still works. You need to have at least three elements of each subclass in this file/test method. They should not be in sorted order already. Use insertion sort, and sort by moving Nodes containing objects on the linked list. I don't care if you sort high to low or low to high or by some other method. Explain your sort criteria in your compareTo(...) method documentation. When I say that two objects are equal, I mean that they have the same subtype and values of all attributes. I do not mean that they are in the same memory location (so you need to write an equals (...) method). Describe your sort key in comments of the header of the compareTo(...) method. Grading: This program is worth 40 points. 10 points for proper Comparable interface usage and compareTo(...) code 10 points for proper doubly linked list code (including Node class code) 10 points for proper insertion sort 10 points for proper deletion Take your class and its multiple subclasses. Read in a set of s. This set should contain some (but not all) duplicate elements. Store the s in sorted order in a doubly-linked list of s based on the GDLL class from the previous homework. The sort key should have two levels. The first level should be a identifier and the second key should be something else. You may modify the GDLL class as you see fit to help you do this. If you run across an in the set you read from, and that is already in the doubly-linked list, delete that before going on to add/delete later s. Print the doubly-linked list after each addition and deletion. Details: Your input file should be either entered from your main program or a separate text file. I will test with your file in the order you have the s, and I will also permute your inputs to see that it still works. You need to have at least three elements of each subclass in this file/test method. They should not be in sorted order already. Use insertion sort, and sort by moving Nodes containing objects on the linked list. I don't care if you sort high to low or low to high or by some other method. Explain your sort criteria in your compareTo(...) method documentation. When I say that two objects are equal, I mean that they have the same subtype and values of all attributes. I do not mean that they are in the same memory location (so you need to write an equals (...) method). Describe your sort key in comments of the header of the compareTo(...) method. Grading: This program is worth 40 points. 10 points for proper Comparable interface usage and compareTo(...) code 10 points for proper doubly linked list code (including Node class code) 10 points for proper insertion sort 10 points for proper deletion
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
1. Read the case thoroughly and answer the questions that follow. 2. Use any relevant chapters as a guide to answer the questions. 3. Extra marks will be awarded for concise and clear answers 4....
-
ed The Engine Guys produces specialized engines for "snow climber buses. The company's normal monthly production volume is 2,500 engines, whereas its monthly production capacity is 5,000 engines. The...
-
An economist might say that colleges and universities "produce" education, using faculty members and students as inputs. According to this line of reasoning, education is then "consumed" by...
-
1. It is not the case that Hitler ran the Third Reich. 2. Nixon resigned the presidency and Lincoln wrote the Gettysburg Address. 3. France bombed Pearl Harbor, or Lindbergh crossed the Atlantic. 4....
-
How does the auditor establish the reasonableness of the allowance for uncollectible accounts?
-
An important parameter in the design of gas absorbers is the ratio of the flow rate of the feed liquid to that of the feed gas. The lower the value of this ratio, the lower the cost of the solvent...
-
A company purchased PPE four years ago for$ 1 0 0 0 0 0 . PPE was depreciated on thestraight - line basis over ten years. Thecompany decided to revalue PPE at the end ofthe fourth year. The net...
-
Baldness is an example of Y-linked inheritance trait True False
-
How important is a good handshake, and what determines a proper handshake?
-
Describe the two individual differences pertinent to communication style principles.
-
Service, retail, manufacturing, and wholesale firms that embrace the marketing concept have adopted or are adopting consultative selling practices. Describe the major features of consultative selling.
-
Consider Southeast Home Care, a for-profit business. In 2020, its net income was $1,500,000 and it distributed $500,000 to owners in the form of dividends. Its beginning-of-year equity balance was...
-
What type of health services organization is most likely to use fund accounting?
-
After gathering data for a report on cubicle height and work productivity, you decide to use a survey to get measurable qualitative and quantitative feedback. What are the advantages of using a...
-
Define the term utility software and give two examples.
-
Explain how creating a process map and internal threat analysis helps in determining the extent to which substantive testing is to be performed on the accounts associated with the supply chain and...
-
Consider the purchases function of a manufacturing company. To overcome a downward profitability trend, management recently instituted a "just-in-time" system of acquiring raw materials for its...
-
Testing for unrecorded liabilities involves vouching a sample of disbursements made after fiscal year end to determine whether the underlying liabilities for the disbursements were recorded at the...
Study smarter with the SolutionInn App