educative.io

Educative

Doubt on the "The purpose of the class diagram"

Hi Team,

You have listed down 4 purpose of a class diagram. I have not understood the 3rd & the 4th points which are below,

  1. To provide a base for component and deployment diagrams; and,
  2. Forward and reverse engineering.

Could you please detail it out a bit more.

Thanks
Avik

Thanks for reaching out to us. The author of the course will be answering your query soon.

Hi @Avik_Dey,

Thanks for reaching out.

The 3rd points stats that the component and the deployment diagrams are based on the class diagram. For example, as Component Diagram defines how components are wired together to form larger components, hence the classes and their relationships described in the Class Digram can provide basis for this design.

The 4th point means we can forward engineer to generate real code specific to any computer language from a class diagram and vice versa.

Hope this clarifies your question.

Hello, regarding car parking object oriented design, code is a total garbage. Where did you implement parkingspot.getNumber() method? You totally forgot to put it there.
freeHandicappedSpotCount++ or some freeSpotCount is incremented whenever freespot is called. However freeSpotCount is not decremented when the new car parking takes place. Come on. What is the initial freeHandicappedSpotCount?