1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svetach [21]
3 years ago
6

You are given a partial implementation of one header file, GildedRose.hpp. Item is a class that holds the information for each i

tem 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.

Engineering
1 answer:
devlian [24]3 years ago
3 0

Answer:

The answer is attached below

Explanation:

You might be interested in
You are driving on a roadway with multiple lanes of travel in the same direction, and are approaching an emergency vehicle parke
solmaris [256]

Answer: a. Leave the lane closest to the emergency as soon as it is safe to do so, or slow down to a speed of 20 MPH below the posted speed limit.

Explanation:

Giving a way to the law enforcement vehicle and a medical emergency vehicle is necessary. If one approaches an emergency vehicle parked along the roadway one should change the lane as the vehicle may not move and the driver may also waste his or her time also one should also slow down his or her speed while approaching the vehicle as most of the emergency vehicle are in rush to reach the hospital so the driver should maintain some distance with the medical emergency vehicle.

7 0
3 years ago
A heat pump operates on a vapor-compression refrigeration cycle with R-134a as the working fluid. The refrigerant enters the com
Rudiy27

Answer:

Hello your question has some missing information below are the missing information

The refrigerant enters the compressor as saturated vapor at 140kPa Determine The coefficient of performance of this heat pump

answer : 2.49

Explanation:

For  vapor-compression refrigeration cycle

P1 = P4  ; P1 = 140 kPa

P2( pressure at inlet ) = P3 ( pressure at outlet ) ; P2 = 800 kPa

<u>From pressure table of R 134a refrigerant</u>

h1 ( enthalpy of saturated vapor at 140kPa ) = 239.16 kJ/kg

h2 ( enthalpy of saturated liquid at P2 = 800 kPa and t = 60°C )

= 296.8kJ/kg

h3 ( enthalpy of saturated liquid at P3 = 800 kPa ) = 95.47 kJ/kg

also h4 = 95.47 kJ/kg

To determine the coefficient of performance  

Cop = ( h1 - h4 ) / ( h2 - h1 )

∴ Cop = 2.49

3 0
3 years ago
5. Will rotating the tires extend their life?<br><br> O Yes<br> O No
ZanzabumX [31]
Answer is yes.
Tire rotation is undertaken to ensure that the tires wear evenly. This can extend tire life and save you money.
For example, failure to rotate tires on a front-wheel-drive vehicle will eventually result in the front tires having significantly less tread than the rear tires.
5 0
3 years ago
Read 2 more answers
P10.12. A certain amplifier has an open-circuit voltage gain of unity, an input resistance of and an output resistance of The si
klio [65]

complete question

A certain amplifier has an open-circuit voltage gain of unity, an input resistance of 1 \mathrm{M} \Omega1MΩ and an output resistance of 100 \Omega100Ω The signal source has an internal voltage of 5 V rms and an internal resistance of 100 \mathrm{k} \Omega.100kΩ. The load resistance is 50 \Omega.50Ω. If the signal source is connected to the amplifier input terminals and the load is connected to the output terminals, find the voltage across the load and the power delivered to the load. Next, consider connecting the load directly across the signal source without the amplifier, and again find the load voltage and power. Compare the results. What do you conclude about the usefulness of a unity-gain amplifier in delivering signal power to a load?

Answer:

3.03 V  0.184 W

2.499 mV  125*10^-9 W

Explanation:

First, apply voltage-divider principle to the input circuit: 1

V_{i}= (R_i/R_i+R_s) *V_s = 10^6/10^6+(0.1*10^6)\\*5

    = 4.545 V

The voltage produced by the voltage-controlled source is:

A_voc*V_i = 4.545 V

We can find voltage across the load, again by using voltage-divider principle:  

V_o = A_voc*V_i*(R_o/R_l+R_o)

      = 4.545*(100/100+50)

      = 3.03 V  

Now we can determine delivered power:  

P_L = V_o^2/R_L

      = 0.184 W

Apply voltage-divider principle to the circuit:  

V_o = (R_o/R_o+R_s)*V_s

       = 50/50+100*10^3*5

       = 2.499 mV

Now we can determine delivered power:  

P_l = V_o^2/R_l

     = 125*10^-9 W

Delivered power to the load is significantly higher in case when we used amplifier, so a unity gain amplifier can be useful in situation when we want to deliver more power to the load. It is the same case with the voltage, no matter that we used amplifier with voltage open-circuit gain of unity.  

4 0
3 years ago
The modulus of elasticity for a ceramic material having 6.0 vol% porosity is 303 GPa. (a) Calculate the modulus of elasticity (i
Phantasy [73]

Answer:

modulus of elasticity for the nonporous material is 340.74 GPa

Explanation:

given data

porosity = 303 GPa

modulus of elasticity = 6.0

solution

we get here  modulus of elasticity for the nonporous material Eo that is

E = Eo (1 - 1.9P + 0.9P²)    ...............1

put here value and we get Eo

303 = Eo ( 1 - 1.9(0.06) + 0.9(0.06)² )  

solve it we get

Eo = 340.74 GPa

8 0
3 years ago
Other questions:
  • The mechanical properties of a metal may be improved by incorporating fine particles of its oxide. Given that the moduli of elas
    11·1 answer
  • A 20.0 µF capacitor is charged to a potential difference of 800 V. The terminals of the charged capacitor are then connected to
    12·1 answer
  • An important ethical concern for behavior analysts involves special cautions in interactions with a client in any capacity outsi
    5·1 answer
  • Give an example of how the fields of science, technology, and mathematics are commonly used when building a highway.
    7·1 answer
  • What are the controlling LRFD load combinations for dead and floor live load?
    11·1 answer
  • A 360 kg/min stream of steam enters a turbine at 40 bar pressure and 100 degrees of superheat. The steam exits the turbine as a
    14·1 answer
  • The first step of the Engineering Design Process is to select the
    5·1 answer
  • What is anthropology? Discuss the type of anthropology?
    5·2 answers
  • A logic circuit with 3 gates and 2 inputs. The circuit will be read from the final output to the inputs.
    9·1 answer
  • The air conditioner in a house or a car has a cooler that brings atmospheric air from 30C to 10C, with both states at 101KPa. If
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!