You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/projects/bookmarker.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,21 +5,23 @@ tags:
5
5
- debugging/exceptions
6
6
---
7
7
8
-
# Description
8
+
# Bookmarker
9
9
10
-
## Purpose
10
+
## Description
11
+
12
+
### Purpose
11
13
12
14
This project is designed to teach you how to manipulate exceptions and properties.
13
15
It reinforces your understanding of class design and implementation while introducing the handling of exceptions.
14
16
15
-
## Challenge
17
+
###Challenge
16
18
17
-
### In short
19
+
####In short
18
20
19
21
Develop a class that helps the user track the progress in their reading of books.
20
22
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!).
21
23
22
-
### In more details
24
+
####In more details
23
25
24
26
#. 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).
25
27
#. 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
39
41
- 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),
40
42
- a method to increment the number of pages read by its argument.
41
43
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
48
45
49
46
Remember that *you* have to develop a `Program.cs``Main` method that will test your class.
50
47
It will probably contain something along the lines of
@@ -133,8 +130,25 @@ Input string was not in a correct format.
133
130
134
131
Note that it is ok if you cannot reproduce this output *exactly*.
135
132
136
-
## Bonuses
133
+
###Bonuses
137
134
138
135
- Have your class handle `string`s, so that, for example, your `Bookmarker` constructor would take _three strings as input_,
139
136
- Have your `Main` method ask the user *how many books they want to track* and create that number of objects,
140
137
- 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):
0 commit comments