subject
Engineering, 28.02.2020 19:39 marioagundis0998

You are given a partial implementation of one header file, GildedRose. hpp. Item is a class that holds the information for each item in the store. GildedRose is a class that holds a listing of Item objects. This inventory should hold at least 10 items. For this you should use C containers. You should use a container from the ones you have studied so far such as the vector or the array. Complete the implementation of GildedRose class, adding public/private member variables and functions as needed. The implementation of Item class is already done for you. You should choose an appropriate data structure to maintain this inventory with an unknown size, known only at runtime. Your code is tested in the provided main. cpp. You will need to implement the following functions: Constructors/Destructors - Initialize your data. Allocate memory where necessary. The destructor should deallocate memory where necessary. size() - This should return the number of items currently for sale (this is different from the capacity). get(size_t) - This should return the item with the matching index. For example if given an index of 3, you should return the item at index 3 in the list. add(Item) - This should add another item for sale in the Gilded Rose by adding it to your inventory. operator[](size_t) - This should perform identical to the get(size_t) function. Initially the given code will not compile. As you complete the code, the tests should start to pass in main. cpp.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 19:10
Afoot bridge is made as a simple deck, 4 m long, with a cross section 2 m (wide) and 20 cm thick, and made of wood. the deck is supported at the two ends. the maximum load allowable on the bridge is 10 tons, provided it is uniformly distributed on the deck. to sense this load, a strain gauge is placed at the center of the bridge and its resistance is monitored. if the sensor has a nominal resistance of 350 s2 and a gauge factor of 3.6, what is the reading of the strain gauge at maximum load? the modulus of elasticity for the wood used in the construction is 10 gpa.
Answers: 2
question
Engineering, 04.07.2019 19:10
The proportional limit is always greater than the yield strength for a material. a)-trune b)- false
Answers: 3
question
Engineering, 04.07.2019 19:20
Ashielded metal arc-welding operation is accomplished in a work cell by a fitter and a welder. the fitter takes 5.5 min to load components into the welding fixture at the beginning of the work cycle, and 1.5 min to unload the completed weldment at the end of the cycle. the total ength of the weld seams 1200 mm, and the travel speed used by the welder averages 300 mm/min. every 600 mm of seam length, the welding stick must be changed, which takes 0.8 min. while the fitter is working, the welder is idle (resting): and while the welder is working the fitter is idle. (a) determine the average arc-on time as a fraction of the work cycle time. (b) how much improvement in arc-on time would result if the welder used flux-cored arc welding (manually operated), given that the spool of weld wire must be changed every 10 weldments, and it takes the welder 5.0 min to accomplish the change? (c) what are the production rates for these two cases (weldments completed per hour)? attach your work and solutions.
Answers: 1
question
Engineering, 06.07.2019 03:20
Acountershaft is supported by two tapered roller bearings using indirect mounting. the radial bearing loads are 1120 lb for the left-hand bearing and 2190 lb for the right-hand bearing. the shaft rotates at 400 rpm and is to have an l10 life of 40,000 hours and an application factor of 1.4. assume ka2k 15, and find the required radial rating of each bearing
Answers: 3
You know the right answer?
You are given a partial implementation of one header file, GildedRose. hpp. Item is a class that hol...
Questions
question
Computers and Technology, 26.02.2021 01:10
question
Mathematics, 26.02.2021 01:10
question
Biology, 26.02.2021 01:10
Questions on the website: 13722367