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
Sliva [168]
4 years ago
7

Write a class named FBoard for playing a game, where player x is trying to get her piece to row 7 and player o is trying to make

it so player x doesn't have any legal moves. It should have: An 8x8 array of char for tracking the positions of the pieces.A data member called gameState that holds one of the following values: X_WON, O_WON, or UNFINISHED - use an enum type for this, not string (the enum definition should go in Board.hpp, before the class, not inside it).Data members to keep track of where the x piece is.A default constructor that initializes the array to empty (you can use whatever character you want to represent empty). It should then put four o pieces on row 7, in columns 0, 2, 4, and 6. It should put an x piece on row 0, column 3. It should also initialize the other data members.A method called getGameState that just returns the value of gameState.A method called moveX that takes as parameters the row and column of the square to move to. If the desired move is not allowed, or if the game has already been won, it should just return false. Otherwise it should make the move and return true. A piece belonging to x can move 1 square diagonally in any direction. A piece is not allowed to move off the board or to an occupied square. If x's move gets her piece to row 7, gameState should be set to X_WON.A method called moveO that takes as parameters the row and column to move from, and the row and column to move to. If the first pair of coordinates doesn't hold o's piece, or if the desired move is not allowed, or if the game has already been won, it should just return false. Othewise it should make the move and return true. A piece belonging to o can move 1 square diagonally, but the row cannot increase, so any o piece has at most two available moves. For example, if player o has a piece at (5, 2), it could move to (4, 1) or (4, 3), but not (6, 1) or (6, 3). It is not allowed to move off the board or to an occupied square. If o's move leaves no legal move for x, gameState should be set to O_WON.You do not need to track whose turn it is. Either move method can be called multiple times in a row. It doesn't matter which index of the array you consider the row and which you consider the column as long as you're consistent.Feel free to add private helper functions if you want. You may also find it useful to add a public print function to help with debugging.Do not access the array out of bounds. Make sure values are in bounds before using them to index into the array.
Engineering
1 answer:
OverLord2011 [107]4 years ago
7 0

Answer:

12345=V

Explanation:

You might be interested in
Helium is used as the working fluid in a Brayton cycle with regeneration. The pressure ratio of the cycle is 8, the compressor i
Temka [501]

Answer:

Explanation:

Find the temperature at exit of compressor

T_2=300 \times 8^{\frac{1.667-1}{1.667} }\\=689.3k

Find the work done by the compressor

\frac{W}{m} =c_p(T_2-T_1)\\\\=5.19(689.3-300)\\=2020.4kJ/kg

Find the actual workdone by the compressor

\frac{W}{m} =n_c(\frac{W}{m} )\\\\=1 \times 2020.4kJ/kg

Find the temperature at exit of the turbine

T_4=\frac{1800}{8^{\frac{1.667-1}{1.667} }} \\\\=787.3k

Find the actual workdone by the turbine

1 \times 5.19 (1800-783.3)\\=5276.6kJ/kg

Find the temperature of the regeneration

\epsilon = \frac{T_5-T_2}{T_4-T_2} \\\\0.75=\frac{T_5-689.3}{783.3-689.3} \\\\T_5=759.8k

Find the heat supplied

Q_i_n=c_p(T_3-T_5)\\\\=5.19(1800-759.8)\\\\=5388.2kJ/kg

Find the thermal efficiency

n_t_h=\frac{W_t-W_c}{Q_i_n} \\\\=\frac{5276.6-2020.4}{5388.2} \\\\n_t_h=60.4

60.4%

Find the mass flow rate

m=\frac{W_net}{P} \\\\\frac{60 \times 10^3}{5276.6-2020.4} \\\\=18.42

Find the actual workdone by the compressor

\frac{W_c}{m} =\frac{(\frac{W}{m} )}{n_c} \\\\=\frac{2020.4}{0.8} \\\\=2525.5kg

Find the actual workdone by the turbine

\frac{W_t}{m} =n_t(\frac{W}{m} )\\\\=0.8 \times5.19(1800-783.3)\\\\=4221.2kJ/kg

Find the temperature of the compressor exit

\frac{W_t}{m} =c_p(T_2_a-T_1)\\2525.5=5.18(T_2_a-300)\\T_2_a=787.5k

Find the temperature at the turbine exit

4221.2=5.18(1800-T_4_a)\\\\T_4_a=985k

Find the temperature of regeneration

\epsilon =\frac{T_5-T_2}{T_4-T_2}\\\\0.75=\frac{T_5-787.5}{985-787.5}\\\\T_5=935.5k

6 0
3 years ago
Read 2 more answers
In a typical transmission line, the current I is very small and the voltage V is very large. A unit length of the line has resis
Rufina [12.5K]

Question:

In a typical transmission line, the current I is very small and the voltage V is very large. A unit length of the line has resistance R.

For a power line that supplies power to 10 000 households, we can conclude that

a) IV < I²R

b) I²R = 0

c) IV = I²R

d) IV > I²R

e) I = V/R

Answer:

d) IV > I²R

Explanation:

In a typical transmission line, the current I is very small and the voltage V is very high as to minimize the I²R losses in the transmission line.

The power delivered to households is given by

P = IV

The losses in the transmission line are given by

Ploss = I²R

Therefore, the relation IV > I²R  holds true, the power delivered to the consumers is always greater than the power lost in the transmission line.

Moreover, losses cannot be more than the power delivered. Losses cannot be zero since the transmission line has some resistance. The power delivered to the consumers is always greater than the power lost in the transmission.

6 0
3 years ago
You were recently hired by the Andrews CEO as a consultant to evaluate the performance of the Chief Financial Officer (CFO). As
goldfiish [28.3K]

Answer: Collect more information about the extent to which this reported behavior is impacting others

Explanation:

The options are:

a. Collect more information about the extent to which this reported behavior is impacting others.

b. Tell the CEO about what you have uncovered and ask for her permission to speak about it with the CFO.

c. Focus on the CFO’s work performance since his personal behavior is inappropriate in the workplace.

d. Inform the human resources department that there is a potential problem.

Given the information provided in the question, the most effective next step in the process will be to collect more information about the extent to which this reported behavior is impacting others. This will be vital in determining whether what is being said about the Chief Financial Officer is true or not and also to know if true, whether it has an affect on the performance of affected employees in the organization.

Option B is wrong as telling the CEO right away isn't the next step as adequate information must be gathered first.

Option C is also wrong as the focus shouldn't be on his work in the organization alone. His personal behavior should be addressed as well if he's wrong. A great organization is made up of great individuals with good behaviors.

Option D is also wrong as the next step should not be to inform the human resource.

Therefore, the correct option is A.

5 0
3 years ago
A piece of corroded steel plate was found in a submerged ocean vessel. It was estimated that the original area of the plate was
shepuryov [24]

Answer:

Time of submersion in years = 7.71 years

Explanation:

Area of plate (A)= 16in²

Mass corroded away = Weight Loss (W) = 3.2 kg = 3.2 x 106

Corrosion Penetration Rate (CPR) = 200mpy

Density of steel (D) = 7.9g/cm³

Constant = 534

The expression for the corrosion penetration rate is

Corrosion Penetration Rate = Constant x Total Weight Loss/Time taken for Weight Loss x Exposed Surface Area x Density of the Metal

Re- arrange the equation for time taken

T = k x W/ A x CPR x D

T = (534 x 3.2 x 106)/(16 x 7.9 x 200)

T = 67594.93 hours

Convert hours into years by

T = 67594.93 x (1year/365 days x 24 hours x 1 day)

T = 7.71 years

3 0
4 years ago
PWM input and output signals are often converted to analog voltage signals using low-pass filters. Design and simulate the follo
Temka [501]

Answer:

Attached below

Explanation:

PWM signal source has 1 KHz base frequency

Analog filter : with time constant = 0.01 s

low pass transfer function = \frac{1}{0.01s + 1 }

PWM duty cycle is a constant block

Attached below is the design and simulation into Simulink at 25% , 50% and 100% respectively

5 0
3 years ago
Other questions:
  • Any programmer who writes a Diophantine equation solver must occasionally encounter an infinite loop.
    13·1 answer
  • A banked highway is designed for traffic moving at v = 88 km/h. The radius of the curve r = 314 m. show answer No Attempt 50% Pa
    5·2 answers
  • Which type of design does not need special care for the placement of dimensions?
    5·1 answer
  • Which of these parts of a cell phone is least likely to be found on the phone's circult board?
    5·1 answer
  • Quien mira WWE.<br>Respondan!​
    10·1 answer
  • 10. Technician A says checking the automatic
    8·1 answer
  • What type of brake uses the inside of each rear wheel hub and rotor assembly as a parking brake drum?
    9·1 answer
  • A 4-L pressure cooker has an operating pressure of 175 kPa. Initially, one-half of the volume is filled with liquid and the othe
    10·1 answer
  • What is the magnitude of the charge of an electron?​
    10·2 answers
  • What were the trade-offs and opportunity costs of one of Teasha’s economic decisions?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!