Question
IN JAVA!!! URGENT!! A download manager is a software that allows you to manage multiple downloads of files in parallel. Typically, the number of simultaneous
IN JAVA!!! URGENT!!
A download manager is a software that allows you to manage multiple downloads of files in parallel. Typically, the number of simultaneous downloads is limited (to optimize the use of the physical connection). The downloads that are not started immediately are put in a waiting list and will start as soon as the conditions allow them. Write a class SimpleDM implements DownloadManager, which handles a single concurrent download. Write a MultipleDM implements DownloadManager class that handles n concurrent downloads, where n is an integer constructor parameter. Program a new implementation of DownloadManager, called PooledDM. In PooledDM, instead of creating a new thread for each download, we want to have n threads permanently, created and started as soon as the instance of PooledDM is built, which will take the requested downloads in turn. Simulate the situation using threads.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started