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, 03.07.2019 14:10
Explain the difference laminar and turbulent flow. explain it with the shear stress and the velocity profiles.
Answers: 1
question
Engineering, 03.07.2019 14:10
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
question
Engineering, 04.07.2019 18:20
Vibration monitoring this technique uses the noise or vibration created by mechanical equipment and in seme cases by plant systems to detemine their actual condtion. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:20
Along 8-cm diameter steam pipe whose external surface temperature is 900c connects two buildings. the pipe is exposed to ambient air at 70c with a wind speed of 50 km/hr blowing across the pipe. determine the heat loss from the pipe per unit length. (b) air at 500c enters a section of a rectangular duct (15 cm x 20 cm) at an average velocity of 7 m/s. if the walls of the duct are maintained at 100c. a) the length of the tube for an exit temperature of the air to be 40 0c. b)the rate of heat transfer from the air. c) the fan power needed to overcome the pressure drop in this section of the duct.
Answers: 1
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
Biology, 18.09.2020 07:01
question
Biology, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Social Studies, 18.09.2020 07:01
question
Social Studies, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
History, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Mathematics, 18.09.2020 07:01
question
Chemistry, 18.09.2020 07:01