###Code Analysis
Code Analysis
###Code Analysis
Code Analysis
Your understanding of a graph is fine. Your understanding of implementing them needs some work. The whole point of a class and encapsulation is to make sure the object keeps and maintains state. Access to the state is controlled so that it can not by manipulatebe manipulated incorrectly.
- Are you giving ownership of the objects to the edge (unlikely).?
- Are the vertices going to be NULL (unlikely)?
Your understanding of a graph is fine. Your understanding of implementing them needs some work. The whole point of a class and encapsulation is to make sure the object keeps and maintains state. Access to the state is controlled so that it can not by manipulate incorrectly.
- Are you giving ownership of the objects to the edge (unlikely).
- Are the vertices going to be NULL (unlikely)
Your understanding of a graph is fine. Your understanding of implementing them needs some work. The whole point of a class and encapsulation is to make sure the object keeps and maintains state. Access to the state is controlled so that it can not be manipulated incorrectly.
- Are you giving ownership of the objects to the edge (unlikely)?
- Are the vertices going to be NULL (unlikely)?