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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:40, baue4431
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
image
Computers and Technology, 22.06.2019 22:30, MoneyMike42
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, CarlosParker99
Think of a spreadsheet as a giant calculator spread of paper chart data collector
Answers: 2
You know the right answer?
Two different implementations of the list adt: arraylist and lllist. for each of the following appl...

Questions in other subjects:

Konu
Mathematics, 24.10.2020 23:10
Konu
English, 24.10.2020 23:10