Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Implement the functions using either arrays or vectors while using the main function to test the program. This is the GildedRose.h file that needs
Please Implement the functions using either arrays or vectors while using the main function to test the program.
This is the GildedRose.h file that needs to be implemented
This is the main.cpp file that has the assertEquals function at the end
Introduction Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods You are provided a listing of items from the latest shipment to the Gilded Rose with each items name, sell in value, and quality. The sell in value is based on gold coins (there is no fraction of a coin). The store wants you to build a program that is able to store each item in an internal list and later retrieve the information in a number of ways Objective You are given a partial implementation of one header file, GildedRose.h. Item is a class that holds the information for each item for the inn. GildedRose is a class that holds an internal listing of many Item objects. This inventory should hold at least 10 items. For this you can use arrays, the std: array class, or even the vector class Complete the implementation of these classes, adding public/private member variables and functions as needed. You should cho with an unknown size known only at runtime. Your code is tested in the provided main.cpp ose an appropriate data structure to maintain this inventory You will need to implement the following functions Constructors/Destructors - Initialize your data. Allocate memory if using a native array. The destructor should deallocate memory if using a native array size() - This should return the number of items currently for sale (this is different from the max) 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 . operator[l(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 your inventory in main.cpp #pragma once #includeStep 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