Answered step by step
Verified Expert Solution
Question
1 Approved Answer
implement TeamManager class using python (1) Codewriting stock/memove from pool request to be fulfiled and then immediately fulil the pool request. Example 1: there are
implement TeamManager class using python
(1) Codewriting stock/memove from pool request to be fulfiled and then immediately fulil the pool request. Example 1: there are axacty 10 of tennis_ball in stock. 1. Add 11 of tennis, ball to pool 1. ii. Check stock of soccer_ball ii. Check stock of cleats. iv. Add. 2 of tennis_balf to the inventory. - Funi Request 1. Request 1 should be fulfilled, and there should be 1 of tennis_ball in stock. iafler it is fulfilied. Example 2: there are 6xactly 10 of tenris._ball in stock, and 5 of clests 1. Add 11 of tennis ball to pool 1 ii. Check stock of soccer ball iii. Check stock of cleats iv Add 2 of cleats to pool 2 . v. Add 2 of tennis ball to the irventory. Request 1 will never be fulfiled, and there will be 4 of tennis ball in the inventory after Request 5. Note: Execution of an existing request does not count. The resource manager should only count new requests received. Example 3; there are exactly 10 of tennis_ball and' 2 of soccer_ball in stock. 1. Add 11 of tennis_ball to pool 1 . ii. Add 3 of soccer_ball to pool 1 . iil. Check stock of soccer_ball. iv. Add 2 of tennis ball to the inventory. - Recuest 1 can be fulfilled now. v. Add. 1 of soccer_ball to the inventory - Request 2 can be fulfilled now. UNIT TESTS 1. Add 11 of tennis_ball to pool 1 . ii. Check stock of soccer_ball. ii. Check stock of cleats. iv. Add 2 of cleats to pool 2. v. Add 2 of tennis ball to the inventory, Request 1 will never be fulfilled, and there will be 4 of tennis ball in the inventory after Request 5 . Note: Execution of an existing request does not count. The resource manager should only count new requests received. Example 3: there are exactly 10 of tennis_ball and 2 of soccer_ball in stock. 1. Add 11 of tennis ball to pool 1. ii. Add 3 of soccer_ball to pool 1 . iii. Check stock of soccer_ball. iv. Add 2 of tennis ball to the inventory. - Request 1 can be fulfilled now. v. Add 1 of soccer_ball to the inventory. - Request 2 can be fulfilled now. - Remove from pool: this should occur immediately. Resource should be removed from pool and returned to the manager inventory. After a resource is removed from a pool, the resource should still exist in the pool, but with a quantity of 0 . - Check pool: this should occur immediately. Retum the contents of the pool. - Contents of the pool can include resources with quantity 0. - [execution time limit] 30 secondsStep 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