Class Diagram

I just had an interview call for solution architect C++, During the interview the AI did not answer for a class diagram question, interviewer were expecting to write a actual class diagram, but AI was showing steps, which is very not helpful, last time also I had faced same issue, Please fix it to class the class diagram, UML, flowchart etc. For example, if same question asked in chatgpt window, it would show a UML design, clas diagram, flow chart completetely, but why not here.

Question from Interviewer:

Design a high-level block diagram and class diagram for a chess application with a 64-block board and different chess pieces.

Interviewer asked me to open MS paint and draw the flow, but PArakeet AI did not help with actual diagram, it was only posting with words, which was good but Interveiwer was expeting a flow.

example:

Expectation:

PAsting from Chatgpt

+----------------------+

| Game |

+----------------------+

| - board : Board |

| - players[2] |

| - currentTurn |

| - gameStatus |

+----------------------+

| +startGame() |

| +makeMove() |

| +undoMove() |

| +checkWinner() |

+----------+-----------+

|

|

Composition

|

+----------v-----------+

| Board |

+----------------------+

| - squares[8][8] |

+----------------------+

| +initialize() |

| +movePiece() |

| +getPiece() |

+----------+-----------+

|

-----------------------------------------

| |

| Composition |

| |

+-----v------+ +-------v-------+

| Square | | Piece |

+------------+ +---------------+

| row | | color |

| column | | position |

| piece | +---------------+

+------------+ | +move() |

| +isValidMove()|

+-------^-------+

|

-------------------------------------------------------------------------

| | | | | |

+------v--+ +-----v-----+ +-----v-----+ +-----v----+ +-------v-----+ +---------v------+

| King | | Queen | | Rook | | Bishop | | Knight | | Pawn |

+---------+ +-----------+ +-----------+ +-----------+ +---------------+ +--------------+

| move() | | move() | | move() | | move() | | move() | | move() |

+---------+ +-----------+ +-----------+ +-----------+ +---------------+ +--------------+

+------------------+ +----------------------+

| Player | | Move |

+------------------+ +----------------------+

| name | | sourceSquare |

| color | | destinationSquare |

+------------------+ | movedPiece |

| makeMove() | | capturedPiece |

+------------------+ | timeStamp |

+----------------------+

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
🚨

Bug Report

Date

6 days ago

Subscribe to post

Get notified by email when there are changes.