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
Determine the total condensation rate of water vapor onto the front surface of a vertical plate that is 10 mm high and 1 m in th
castortr0y [4]

Answer:

Q =  63,827.5 W

Explanation:

Given:-

- The dimensions of plate A = ( 10 mm x 1 m )

- The fluid comes at T_sat , 1 atm.

- The surface temperature, T_s = 75°C  

Find:-

Determine the total condensation rate of water vapor onto the front surface of a vertical plate

Solution:-

- Assuming drop-wise condensation the heat transfer coefficient for water is given by Griffith's empirical relation for T_sat = 100°C.

                            h = 255,310 W /m^2.K

- The rate of condensation (Q) is given by Newton's cooling law:

                           Q = h*As*( T_sat - Ts )

                           Q = (255,310)*( 0.01*1)*( 100 - 75 )

                           Q =  63,827.5 W

8 0
3 years ago
Read 2 more answers
1. (5 pts) An adiabatic steam turbine operating reversibly in a powerplant receives 5 kg/s steam at 3000 kPa, 500 °C. Twenty per
KiRa [710]

Answer:

temperature of first extraction 330.8°C

temperature of second extraction 140.8°C

power output=3168Kw

Explanation:

Hello!

To solve this problem we must use the following steps.

1. We will call 1 the water vapor inlet, 2 the first extraction at 100kPa and 3 the second extraction at 200kPa

2. We use the continuity equation that states that the mass flow that enters must equal the two mass flows that leave

m1=m2+m3

As the problem says, 20% of the flow represents the first extraction for which 5 * 20% = 1kg / s

solving

5=1+m3

m3=4kg/s

3.

we find the enthalpies and temeperatures in each of the states, using thermodynamic tables

Through laboratory tests, thermodynamic tables were developed, these allow to know all the thermodynamic properties of a substance (entropy, enthalpy, pressure, specific volume, internal energy etc ..)  

through prior knowledge of two other properties

4.we find the enthalpy and entropy of state 1 using pressure and temperature

h1=Enthalpy(Water;T=T1;P=P1)

h1=3457KJ/kg

s1=Entropy(Water;T=T1;P=P1)

s1=7.234KJ/kg

4.

remembering that it is a reversible process we find the enthalpy and the temperature in the first extraction with the pressure 1000 kPa and the entropy of state 1

h2=Enthalpy(Water;s=s1;P=P2)

h2=3116KJ/kg

T2=Temperature(Water;P=P2;s=s1)

T2=330.8°C

5.we find the enthalpy and the temperature in the second extraction with the pressure 200 kPav y the entropy of state 1

h3=Enthalpy(Water;s=s1;P=P3)

h3=2750KJ/kg

T3=Temperature(Water;P=P3;s=s1)

T3=140.8°C

6.

Finally, to find the power of the turbine, we must use the first law of thermodynamics that states that the energy that enters is the same that must come out.

For this case, the turbine uses a mass flow of 5kg / s until the first extraction, and then uses a mass flow of 4kg / s for the second extraction, taking into account the above we infer the following equation

W=m1(h1-h2)+m3(h2-h3)

W=5(3457-3116)+4(3116-2750)=3168Kw

7 0
3 years ago
Write a program that removes all spaces from the given input. You may assume that the input string will not exceed 50 characters
GrogVix [38]

Answer:

Program that removes all spaces from the given input

Explanation:

// An efficient Java program to remove all spaces  

// from a string  

class GFG  

{  

 

// Function to remove all spaces  

// from a given string  

static int removeSpaces(char []str)  

{  

   // To keep track of non-space character count  

   int count = 0;  

 

   // Traverse the given string.  

   // If current character  

   // is not space, then place  

   // it at index 'count++'  

   for (int i = 0; i<str.length; i++)  

       if (str[i] != ' ')  

           str[count++] = str[i]; // here count is  

                                   // incremented  

         

   return count;  

}  

 

// Driver code  

public static void main(String[] args)  

{  

   char str[] = "g eeks for ge eeks ".toCharArray();  

   int i = removeSpaces(str);  

   System.out.println(String.valueOf(str).subSequence(0, i));  

}  

}  

5 0
4 years ago
Read 2 more answers
A person walks into a refrigerated warehouse with head uncovered. Model the head as a 25- cm diameter sphere at 35°C with a surf
galina1969 [7]

Answer:

Hello some parts of your question is missing below is the missing part

Convection coefficient = 11 w/m^2. °c

answer : 44.83 watts

Explanation:

Given data :

surface emissivity ( ε )= 0.95

head ( sphere) diameter( D )  = 0.25 m

Temperature of sphere( T )  = 35° C

Temperature of surrounding ( T∞ )  = 25°C

Temperature of surrounding surface ( Ts ) = 15°C

б  = ( 5.67 * 10^-8 )

Determine the total rate of heat loss

First we calculate the surface area of the sphere

As = \pi D^{2}  

= \pi * 0.25^2 =  0.2 m^2

next we calculate heat loss due to radiation

Qrad = ε * б * As( T^{4} - T^{4} _{s} )  ---- ( 1 )

where ;

ε = 0.95

б = ( 5.67 * 10^-8 )

As = 0.2 m^2

T = 35 + 273 = 308 k

Ts = 15 + 273 = 288 k

input values into equation 1

Qrad = 0.95 * ( 5.67 * 10^-8 ) * 0.2 ( (308)^4 - ( 288)^4 )

         = 22.83  watts

Qrad ( heat loss due to radiation ) = 22.83 watts

calculate the heat loss due to convection

Qconv = h* As ( ΔT )

           = 11*0.2 ( 35 -25 )  = 22 watts

Hence total rate of heat loss

=  22 + 22.83

= 44.83 watts

5 0
3 years ago
have you ever heard the myth that a penny dropped off the empire state building can be dangerous? the penny would be traveling v
Yuri [45]

Answer: yes

Explanation: ontop of a tall building, you drop a small peace of metal covered in zinc. it is possible to be very dangerus because of gravity. some one walking on the side walk who gets hit in the head can get a concusion maybe even a brain injury.

7 0
3 years ago
Other questions:
  • A fluid has a dynamic viscosity of 0.048 Pa.s and a specific gravity of 0.913. For the flow of such a fluid over a flat solid su
    10·1 answer
  • Describe three advantages and three disadvantages of JIT?
    12·1 answer
  • The direction of rotation of a dc series motor or a universal motor connected to a dc power source A) depends on the polarities
    15·1 answer
  • A worker standing on a freshly mopped floor is
    7·1 answer
  • 5. What are the 3 basic types of electrical circuits?
    12·1 answer
  • Evaporation in Double-Effect Reverse-Feed Evaporators. A feed containing 2 wt % dissolved organic solids in water is fed to a do
    14·1 answer
  • Use the writeln() method of the document object to display the user agent in a tag in the webpage. Hint: The userAgent property
    5·1 answer
  • Design complementary static CMOS circuits with minimized number of transistors to realize the following Boolean functions (hint:
    13·1 answer
  • The controlled variable in a closed-loop system is the direction of a robot arm. Initially, it is at 50o; then it is commanded t
    12·1 answer
  • The hypotenuse of a 45° right triangle is
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!