Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION: WHICH OF THE TWO VERSION(PART B AND PART C), IN YOUR OPINION, REPRESENTS A PROCESS-CENTERED APPORACH ? WHICH ONE REPRESENT A DATA-CENTERED APPROACH ?

image text in transcribed

QUESTION: WHICH OF THE TWO VERSION(PART B AND PART C), IN YOUR OPINION, REPRESENTS A PROCESS-CENTERED APPORACH ? WHICH ONE REPRESENT A DATA-CENTERED APPROACH ? WHAT ADDITIONAL FEATURES, IN YOUR OPINION, IF ADDED TO THE LINKEDLIST CLASS MIGHT REDUCE: THE CODING EFFORT IN PART C? JUSTIFY ALL YOUR CLAIMS.

a b Within the main() program, instantiate a linked list (use the Java LinkedList class). Write the following functions(methods) that the main program will invoke (all these will be static methods of the main class): store (, ) that reads the data for several persons from the input stream and stores the data in the linked list. display(output stream>, ) that writes the data for all person ob- jects in the linked list, on the output stream, one per line. find (string sid, ) that returns the index of the person object in the linked list, that has the same id value as sid (return -1 if no such person exists). This can be done as a simple search that goes sequentially through all the objects in the linked list. Create a data file with data for a few person objects. In the main method, call the store () and display() methods to read the data and display it. Invoke the find method a few times. Compile and test your code. c Construct a different version of the above program as follows: (1) create a data type Personlist that uses the Java LinkedList, and supports the methods(re- written appropriately) from part b. (2) instantiate the PersonList object in the main program and invoke its methods (as per the appropriate syntax), so that program produces the same output as the one in part b

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

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

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions