Skip to content

Commit f38d1d2

Browse files
ClémentClément
authored andcommitted
Moving bookmarker project
1 parent a1d18d8 commit f38d1d2

File tree

3 files changed

+26
-34
lines changed

3 files changed

+26
-34
lines changed

source/projects/bookmarker/description.md renamed to source/projects/bookmarker.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ tags:
55
- debugging/exceptions
66
---
77

8-
# Description
8+
# Bookmarker
99

10-
## Purpose
10+
## Description
11+
12+
### Purpose
1113

1214
This project is designed to teach you how to manipulate exceptions and properties.
1315
It reinforces your understanding of class design and implementation while introducing the handling of exceptions.
1416

15-
## Challenge
17+
### Challenge
1618

17-
### In short
19+
#### In short
1820

1921
Develop a class that helps the user track the progress in their reading of books.
2022
Your class should allow users to track the book title, total page number, and the current page they stopped their reading at (as a bookmark!).
2123

22-
### In more details
24+
#### In more details
2325

2426
#. Your goal is to design and implement a `Bookmarker` class containing three attributes and several methods (some of which may and should be implemented using properties).
2527
#. You *must* develop a `Program` class with a `Main` method to test your `Bookmarker` class, and this `Program` class will be part of your grade.
@@ -39,12 +41,7 @@ Your class should allow users to track the book title, total page number, and th
3941
- a `ToString` method that returns a `string` containing the title, how much of the book was read, and how much of the book is left (the last two in percentages),
4042
- a method to increment the number of pages read by its argument.
4143

42-
## Submission
43-
44-
Please, follow our [guideline on project submission](./projects/submission).
45-
In particular, make sure you write your name and the date in a delimited comment at the beginning of your file.
46-
47-
## Example
44+
### Example
4845

4946
Remember that *you* have to develop a `Program.cs` `Main` method that will test your class.
5047
It will probably contain something along the lines of
@@ -133,8 +130,25 @@ Input string was not in a correct format.
133130

134131
Note that it is ok if you cannot reproduce this output *exactly*.
135132

136-
## Bonuses
133+
### Bonuses
137134

138135
- Have your class handle `string`s, so that, for example, your `Bookmarker` constructor would take _three strings as input_,
139136
- Have your `Main` method ask the user *how many books they want to track* and create that number of objects,
140137
- Implement a _static_ ISBN-13 checker: your method should take as input a `string` representing an ISBN-13, and return `true` if it is valid. Consult [wikipedia](https://en.wikipedia.org/wiki/ISBN#ISBN-13_check_digit_calculation) on how a ISBN is determined to be valid, and try your best!
138+
139+
## Solution
140+
141+
A possible solution is shared [in this archive](./code/projects/Bookmarker.zip):
142+
143+
```
144+
!include code/projects/Bookmarker/Bookmarker/Bookmarker.cs
145+
```
146+
```{download="./code/projects/Bookmarker.zip"}
147+
!include code/projects/Bookmarker/Bookmarker/Program.cs
148+
```
149+
150+
A solution completing the bonus
151+
152+
> "Have your class handle strings, so that, for example, your Bookmarker constructor would take three strings as input"
153+
154+
is shared [in this archive](./code/projects/Bookmarker_with_strings.zip).

source/projects/bookmarker/index.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

source/projects/bookmarker/solution.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)