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
What is the ls option that prints the author of a file?​
nataly862011 [7]

Answer:

You need to use option '–author' along with option '-l' to print the author name of each file.

Explanation:

hopefully this helps you sorry if it doesn’t help you

4 0
3 years ago
A light bar AD is suspended from a cable BE and supports a 20-kg block at C. The ends A and D of the bar are in contact with fri
babymother [125]

Answer:

Tension in cable BE= 196.2 N

Reactions A and D both are  73.575 N

Explanation:

The free body diagram is as attached sketch. At equilibrium, sum of forces along y axis will be 0 hence

T_{BE}-W=0 hence

T_{BE}=W=20*9.81=196.2 N

Therefore, tension in the cable, T_{BE}=196.2 N

Taking moments about point A, with clockwise moments as positive while anticlockwise moments as negative then

196.2\times 0.125- 196.2\times 0.2+ D_x\times 0.2=0

24.525-39.24+0.2D_x=0

D_x=73.575 N

Similarly,

A_x-D_y=0

A_x=73.575 N

Therefore, both reactions at A and D are 73.575 N

7 0
3 years ago
An ideal Otto cycle has a compression ratio of 8. At the beginning of the compression process, air is at 95 kPa and 278C, and 75
Inessa [10]

Answer:

(a). The value of temperature at the end of heat addition process            T_{3} = 2042.56 K

(b). The value of pressure at the end of heat addition process                    P_{3} = 1555.46 k pa

(c). The thermal efficiency of an Otto cycle   E_{otto} = 0.4478

(d). The value of mean effective pressure of the cycle P_{m} = 1506.41 \frac{k pa}{kg}

Explanation:

Compression ratio r_{p} = 8

Initial pressure P_{1} = 95 k pa

Initial temperature T_{1} = 278 °c = 551 K

Final pressure P_{2} = 8 × P_{1} = 8 × 95 = 760 k pa

Final temperature T_{2} = T_{1} × r_{p} ^{\frac{\gamma - 1}{\gamma} }

Final temperature T_{2} = 551 × 8 ^{\frac{1.4 - 1}{1.4} }

Final temperature T_{2} = 998 K

Heat transferred at constant volume Q = 750 \frac{KJ}{kg}

(a). We know that Heat transferred at constant volume Q_{S} = m C_{v} ( T_{3} - T_{2}  )

⇒ 1 × 0.718 × ( T_{3} - 998 ) = 750

⇒ T_{3} = 2042.56 K

This is the value of temperature at the end of heat addition process.

Since heat addition is constant volume process. so for that process pressure is directly proportional to the temperature.

⇒ P ∝ T

⇒ \frac{P_{3} }{P_{2} } = \frac{T_{3} }{T_{2} }

⇒ P_{3} = \frac{2042.56}{998} × 760

⇒ P_{3} = 1555.46 k pa

This is the value of pressure at the end of heat addition process.

(b). Heat rejected from the cycle Q_{R} = m C_{v} ( T_{4} - T_{1}  )

For the compression and expansion process,

⇒ \frac{T_{3} }{T_{2} } = \frac{T_{4} }{T_{1} }

⇒ \frac{2042.56}{998} = \frac{T_{4} }{551}

⇒ T_{4} = 1127.7 K

Heat rejected Q_{R} = 1 × 0.718 × ( 1127.7 - 551)

⇒ Q_{R} = 414.07 \frac{KJ}{kg}

Net heat interaction from the cycle Q_{net} = Q_{S} - Q_{R}

Put the values of Q_{S} & Q_{R}  we get,

⇒ Q_{net} = 750 - 414.07

⇒ Q_{net} = 335.93 \frac{KJ}{kg}

We know that for a cyclic process net heat interaction is equal to net work transfer.

⇒ Q_{net} = W_{net}

⇒ W_{net} = 335.93 \frac{KJ}{kg}

This is the net work output from the cycle.

(c). Thermal efficiency of an Otto cycle is given by

E_{otto} = 1- \frac{T_{1} }{T_{2} }

Put the values of T_{1} & T_{2} in the above formula we get,

E_{otto} = 1- \frac{551 }{998 }

⇒ E_{otto} = 0.4478

This is the thermal efficiency of an Otto cycle.

(d). Mean effective pressure P_{m} :-

We know that mean effective pressure of  the Otto cycle is  given by

P_{m} = \frac{W_{net} }{V_{s} } ---------- (1)

where V_{s} is the swept volume.

V_{s} = V_{1}  - V_{2} ---------- ( 2 )

From ideal gas equation P_{1} V_{1} = m × R × T_{1}

Put all the values in above formula we get,

⇒ 95 × V_{1} = 1 × 0.287 × 551

⇒ V_{1} = 0.6 m^{3}

From the same ideal gas equation

P_{2} V_{2} = m × R × T_{2}

⇒ 760 × V_{2} = 1 × 0.287 × 998

⇒ V_{2} = 0.377 m^{3}

Thus swept volume V_{s} = 0.6 - 0.377

⇒ V_{s} = 0.223 m^{3}

Thus from equation 1 the mean effective pressure

⇒ P_{m} = \frac{335.93}{0.223}

⇒ P_{m} = 1506.41 \frac{k pa}{kg}

This is the value of mean effective pressure of the cycle.

4 0
3 years ago
3. Which of the following statements is false?
MrRa [10]

Answer: c.An accumulator is not used in a system with a receiver/dryer

Explanation:

In a refrigeration system, a condenser is used to transfer heat and this occurs from the refrigerant to the air or water.

Then, the refrigerant then condenses to liquid when the hear has been transferred.

We should note that the condenser is normally mounted in front of the radiator. The receiver/dryer is a storage tank for the liquid refrigerant from the condenser.

The statement that an accumulator is not used in a system with a receiver/dryer is not true. This is because, the accumulator gives protection to the compressor which helps to prevent the failure of the compressor.

Therefore, the answer is C.

7 0
3 years ago
Shear plane angle and shear strain: In an orthogonal cutting operation, the tool has a rake angle = 16°. The chip thickness befo
Oduvanchick [21]

Answer:

shear plane angle Ф = 26.28°

shear strain 2.20

Explanation:

given data

angle = 16°

chip thickness t1 = 0.32 mm

cut yields chip thickness t2 = 0.72 mm

solution

we get here first chip thickness ratio that is

chip thickness ratio = \frac{t1}{t2}    ................. 1

put here value

chip thickness ratio  = \frac{0.32}{0.72}  

chip thickness ratio r = 0.45

so here shear angle will be Ф

tan Ф = \frac{r*cos\alpha }{1-rsin\alpha}   ............2

tan Ф = \frac{0.45*cos16 }{1-rsin16}  

tan Ф = 0.4938

Ф = 26.28°

and

now we get shear strain that is

shear strain r = cot Ф + tan (Ф - α )   ................3

shear strain r  = cot(26.28) + tan (26.28 - 16 )

shear strain r = 2.20

6 0
3 years ago
Other questions:
  • As a newly hired professional engineer your an executive with the firm strongly suggests that you attend a monthly dinner party
    8·1 answer
  • A certain full-wave rectifier has a peak output voltage of 30 V. A 50 mF capacitor-input filter is connected to the rectifier. C
    6·1 answer
  • Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands coul
    6·1 answer
  • A long aluminum wire of diameter 3 mm is extruded at a temperature of 280°C. The wire is subjected to cross air flow at 20°C at
    9·1 answer
  • What is a engineer ?
    15·2 answers
  • Refrigerant 134a at p1 = 30 lbf/in2, T1 = 40oF enters a compressor operating at steady state with a mass flow rate of 200 lb/h a
    14·1 answer
  • std::string x[n]; int mode1count = 0; // msft int mode2count = 0; // appl int mode3count = 0; // csco int mode4count = 0; // imb
    13·1 answer
  • What are the advantages and disadvantages of each type of structure?
    14·1 answer
  • The two basic categories of electrical switches are manual and ??
    10·2 answers
  • 1. What affects the weight of an airplane?<br> a. Mass<br> b. Matter<br> c. Materials<br> d. Sped
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!