subject

Two different implementations of the list adt: arraylist and lllist. for each of the following applications, decide which list implementation would be better for that particular application. you should consider both time efficiency and space efficiency, and you should assume that both implementations have an associated iterator like the lllistiterator that we discussed in lecture. explain your answers.

you need to store information about the gardening tools that you sell in your online store. to do so, you maintain a list of product records, each of which contains information about a single type of product, including how many copies of it you have in stock. you don’t tend to change the types of tools that you sell, and thus items are seldom added or removed from the list. however, you need to update a product’s record whenever your inventory of that product changes (e. g., because someone purchases a product’s position in the list is also its product id, and therefore updating a record involves using the product id to get the corresponding record and modifying its contents.

you need to maintain a list of tweets that are made by government officials in the current week. the number of tweets can vary widely from week to week in a way that is hard to predict. you start with an empty list at the start of the week, and as tweets are made you add them to the list. you need to frequently display the tweets in reverse chronological order – from most recent to least recent.

you are responsible for maintaining a monthly list of events for an online arts calendar. the number of events is fairly consistent from month to month. events are added to the list in chronological order, and you need to display them in that same order.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
You know the right answer?
Two different implementations of the list adt: arraylist and lllist. for each of the following appl...
Questions
question
Mathematics, 07.10.2019 21:00
question
Mathematics, 07.10.2019 21:00
Questions on the website: 13722360