-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15d5493
commit e365e6e
Showing
46 changed files
with
995 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,44 @@ | ||
export class File { | ||
|
||
public isOpen(): boolean { | ||
throw new Error("no implementation"); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
public isClosed(): boolean { | ||
throw new Error("no implementation"); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
public open(): void { | ||
this.assertIsClosedFile(); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
public read(): Object[] { | ||
this.assertIsOpenFile(); | ||
throw new Error("no implementation"); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
public write(data: Object[]): void { | ||
this.assertIsOpenFile(); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
public close(): void { | ||
this.assertIsOpenFile(); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
public delete(): void { | ||
this.assertIsClosedFile(); | ||
throw new Error("no implementation"); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
protected assertIsOpenFile(): void { | ||
throw new Error("no implementation"); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
protected assertIsClosedFile(): void { | ||
throw new Error("no implementation"); | ||
throw new Error("incomplete example code"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.