Description
We need to implement a static method loadTriangle(String path) in the NumberTriangle class that loads triangle data from a file.
Requirements
- Read triangle data from the specified file path
- Parse the file contents and create a NumberTriangle object
- Handle invalid file paths with appropriate error handling
- Support the expected file format for triangle data
Expected Behavior
The method should:
- Take a file path as a String parameter
- Read and parse the file contents
- Return a properly initialized NumberTriangle object
- Throw appropriate exceptions for invalid inputs or file errors
Acceptance Criteria
Description
We need to implement a static method
loadTriangle(String path)in the NumberTriangle class that loads triangle data from a file.Requirements
Expected Behavior
The method should:
Acceptance Criteria