Skip to content

Commit 589c4ff

Browse files
committed
Changes
1 parent 3bcda02 commit 589c4ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1387
-27
lines changed
Binary file not shown.
Binary file not shown.

.vs/APComputerScience-CreateTask-Assignment/v17/DocumentLayout.json

+2-18
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
{
66
"AbsoluteMoniker": "D:0:0:{5AB77EFE-8F20-4A15-9B39-F22F9DA9D670}|APComputerScience-CreateTask-Assignment\\APComputerScience-CreateTask-Assignment.csproj|c:\\users\\thinc\\source\\repos\\apcomputerscience-createtask-assignment\\apcomputerscience-createtask-assignment\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
77
"RelativeMoniker": "D:0:0:{5AB77EFE-8F20-4A15-9B39-F22F9DA9D670}|APComputerScience-CreateTask-Assignment\\APComputerScience-CreateTask-Assignment.csproj|solutionrelative:apcomputerscience-createtask-assignment\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
8-
},
9-
{
10-
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Thinc\\AppData\\Local\\SourceServer\\309c8dfc5030d3cf23be8900b9dbafc30cc3a161a4f8a96003ad952921cae739\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\List.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
118
}
129
],
1310
"DocumentGroupContainers": [
@@ -17,21 +14,8 @@
1714
"DocumentGroups": [
1815
{
1916
"DockedWidth": 200,
20-
"SelectedChildIndex": 1,
17+
"SelectedChildIndex": 0,
2118
"Children": [
22-
{
23-
"$type": "Document",
24-
"DocumentIndex": 1,
25-
"Title": "List.cs",
26-
"DocumentMoniker": "C:\\Users\\Thinc\\AppData\\Local\\SourceServer\\309c8dfc5030d3cf23be8900b9dbafc30cc3a161a4f8a96003ad952921cae739\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\List.cs",
27-
"RelativeDocumentMoniker": "..\\..\\..\\AppData\\Local\\SourceServer\\309c8dfc5030d3cf23be8900b9dbafc30cc3a161a4f8a96003ad952921cae739\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\List.cs",
28-
"ToolTip": "C:\\Users\\Thinc\\AppData\\Local\\SourceServer\\309c8dfc5030d3cf23be8900b9dbafc30cc3a161a4f8a96003ad952921cae739\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\List.cs",
29-
"RelativeToolTip": "..\\..\\..\\AppData\\Local\\SourceServer\\309c8dfc5030d3cf23be8900b9dbafc30cc3a161a4f8a96003ad952921cae739\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\List.cs",
30-
"ViewState": "AQIAAIIAAAAAAAAAAAAiwJUAAAAUAAAA",
31-
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
32-
"WhenOpened": "2024-04-11T17:59:24.771Z",
33-
"EditorCaption": ""
34-
},
3519
{
3620
"$type": "Document",
3721
"DocumentIndex": 0,
@@ -40,7 +24,7 @@
4024
"RelativeDocumentMoniker": "APComputerScience-CreateTask-Assignment\\Program.cs",
4125
"ToolTip": "C:\\Users\\Thinc\\source\\repos\\APComputerScience-CreateTask-Assignment\\APComputerScience-CreateTask-Assignment\\Program.cs",
4226
"RelativeToolTip": "APComputerScience-CreateTask-Assignment\\Program.cs",
43-
"ViewState": "AQIAAAAAAAAAAAAAAAAAABMAAAAoAAAA",
27+
"ViewState": "AQIAAD8AAAAAAAAAAAAAAAoAAAAmAAAA",
4428
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
4529
"WhenOpened": "2024-04-04T12:38:05.332Z",
4630
"EditorCaption": ""
Binary file not shown.
Binary file not shown.

APComputerScience-CreateTask-Assignment/Program.cs

+37-6
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static void PageReader()
8080
Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
8181
Console.Write("What Navigation would you like to do from the above options?: ");
8282
string Option = Console.ReadLine();
83-
Functions(Option, ref currentPage, ref BookFinishedForNow);
83+
Functions(Option, ref currentPage, ref BookFinishedForNow, Pages.Count);
8484
Save(ref saveLines, ref Book, ref saveFilePath, ref currentPage);
8585
}
8686
else
@@ -102,15 +102,29 @@ public static void PageReader()
102102
}
103103
}
104104
}
105-
public static void Functions(string Option, ref int currentPage, ref bool BookFinishedForNow)
105+
public static void Functions(string Option, ref int currentPage, ref bool BookFinishedForNow, int totalPages)
106106
{
107107
if (Option == ">")
108108
{
109-
currentPage++;
109+
if (currentPage < totalPages - 1)
110+
{
111+
currentPage++;
112+
}
113+
else
114+
{
115+
Console.WriteLine("Error: You are already on the last page.");
116+
}
110117
}
111118
else if (Option == "<")
112119
{
113-
currentPage--;
120+
if (currentPage > 0)
121+
{
122+
currentPage--;
123+
}
124+
else
125+
{
126+
Console.WriteLine("Error: You are already on the first page.");
127+
}
114128
}
115129
else if (Option == "X")
116130
{
@@ -126,15 +140,32 @@ public static void Functions(string Option, ref int currentPage, ref bool BookFi
126140
Option = Console.ReadLine();
127141
if (Option == ">")
128142
{
129-
currentPage++;
143+
if (currentPage < totalPages - 1)
144+
{
145+
currentPage++;
146+
y++;
147+
}
148+
else
149+
{
150+
Console.WriteLine("Error: You are already on the last page.");
151+
}
130152
}
131153
else if (Option == "<")
132154
{
133-
currentPage--;
155+
if (currentPage > 0)
156+
{
157+
currentPage--;
158+
y++;
159+
}
160+
else
161+
{
162+
Console.WriteLine("Error: You are already on the first page.");
163+
}
134164
}
135165
else if (Option == "X")
136166
{
137167
BookFinishedForNow = true;
168+
y++;
138169
}
139170
}
140171
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
In the year 1878 I took my degree of
2+
Doctor of Medicine of the University of
3+
London, and proceeded to Netley to go
4+
through the course prescribed for sur-
5+
geons in the army. Having completed my studies
6+
there, I was duly attached to the Fifth Northum-
7+
berland Fusiliers as Assistant Surgeon. The regi-
8+
ment was stationed in India at the time, and before
9+
I could join it, the second Afghan war had bro-
10+
ken out. On landing at Bombay, I learned that my
11+
corps had advanced through the passes, and was
12+
already deep in the enemy’s country. I followed,
13+
however, with many other officers who were in the
14+
same situation as myself, and succeeded in reach-
15+
ing Candahar in safety, where I found my regi-
16+
ment, and at once entered upon my new duties.
17+
The campaign brought honours and promotion
18+
to many, but for me it had nothing but misfortune
19+
and disaster. I was removed from my brigade and
20+
attached to the Berkshires, with whom I served at
21+
the fatal battle of Maiwand. There I was struck
22+
on the shoulder by a Jezail bullet, which shat-
23+
tered the bone and grazed the subclavian artery.
24+
I should have fallen into the hands of the murder-
25+
ous Ghazis had it not been for the devotion and
26+
courage shown by Murray, my orderly, who threw
27+
me across a pack-horse, and succeeded in bringing
28+
me safely to the British lines.
29+
Worn with pain, and weak from the prolonged
30+
hardships which I had undergone, I was removed,
31+
with a great train of wounded sufferers, to the base
32+
hospital at Peshawar. Here I rallied, and had al-
33+
ready improved so far as to be able to walk about
34+
the wards, and even to bask a little upon the ve-
35+
randah, when I was struck down by enteric fever,
36+
that curse of our Indian possessions. For months
37+
my life was despaired of, and when at last I came
38+
to myself and became convalescent, I was so weak
39+
and emaciated that a medical board determined
40+
that not a day should be lost in sending me back
41+
to England. I was dispatched, accordingly, in the
42+
troopship Orontes, and landed a month later on
43+
Portsmouth jetty, with my health irretrievably ru-
44+
ined, but with permission from a paternal govern-
45+
ment to spend the next nine months in attempting
46+
to improve it.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
I had neither kith nor kin in England, and was
2+
therefore as free as air—or as free as an income
3+
of eleven shillings and sixpence a day will permit
4+
a man to be. Under such circumstances, I natu-
5+
rally gravitated to London, that great cesspool into
6+
which all the loungers and idlers of the Empire are
7+
irresistibly drained. There I stayed for some time
8+
at a private hotel in the Strand, leading a com-
9+
fortless, meaningless existence, and spending such
10+
money as I had, considerably more freely than I
11+
ought. So alarming did the state of my finances
12+
become, that I soon realized that I must either
13+
leave the metropolis and rusticate somewhere in
14+
the country, or that I must make a complete alter-
15+
ation in my style of living. Choosing the latter al-
16+
ternative, I began by making up my mind to leave
17+
the hotel, and to take up my quarters in some less
18+
pretentious and less expensive domicile.
19+
On the very day that I had come to this con-
20+
clusion, I was standing at the Criterion Bar, when
21+
some one tapped me on the shoulder, and turn-
22+
ing round I recognized young Stamford, who had
23+
been a dresser under me at Bart’s. The sight of a
24+
friendly face in the great wilderness of London is
25+
a pleasant thing indeed to a lonely man. In old
26+
days Stamford had never been a particular crony
27+
of mine, but now I hailed him with enthusiasm,
28+
and he, in his turn, appeared to be delighted to
29+
see me. In the exuberance of my joy, I asked him
30+
to lunch with me at the Holborn, and we started
31+
off together in a hansom.
32+
“Whatever have you been doing with yourself,
33+
Watson?” he asked in undisguised wonder, as we
34+
rattled through the crowded London streets. “You
35+
are as thin as a lath and as brown as a nut.”
36+
I gave him a short sketch of my adventures,
37+
and had hardly concluded it by the time that we
38+
reached our destination.
39+
“Poor devil!” he said, commiseratingly, after he
40+
had listened to my misfortunes. “What are you up
41+
to now?”
42+
“Looking for lodgings,” I answered. “Trying to
43+
solve the problem as to whether it is possible to
44+
get comfortable rooms at a reasonable price.”
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
“A fellow who is working at the chemical labo-
2+
ratory up at the hospital. He was bemoaning him-
3+
self this morning because he could not get some-
4+
one to go halves with him in some nice rooms
5+
which he had found, and which were too much
6+
for his purse.”
7+
“By Jove!” I cried, “if he really wants someone
8+
to share the rooms and the expense, I am the very
9+
man for him. I should prefer having a partner to
10+
being alone.”
11+
Young Stamford looked rather strangely at me
12+
over his wine-glass. “You don’t know Sherlock
13+
Holmes yet,” he said; “perhaps you would not care
14+
for him as a constant companion.”
15+
“Why, what is there against him?”
16+
“Oh, I didn’t say there was anything against
17+
him. He is a little queer in his ideas—an enthusi-
18+
ast in some branches of science. As far as I know
19+
he is a decent fellow enough.”
20+
“A medical student, I suppose?” said I.
21+
“No—I have no idea what he intends to go in
22+
for. I believe he is well up in anatomy, and he is a
23+
first-class chemist; but, as far as I know, he has
24+
never taken out any systematic medical classes.
25+
His studies are very desultory and eccentric, but
26+
he has amassed a lot of out-of-the way knowledge
27+
which would astonish his professors.”
28+
“Did you never ask him what he was going in
29+
for?” I asked.
30+
“No; he is not a man that it is easy to draw out,
31+
though he can be communicative enough when the
32+
fancy seizes him.”
33+
“I should like to meet him,” I said. “If I am to
34+
lodge with anyone, I should prefer a man of stu-
35+
dious and quiet habits. I am not strong enough yet
36+
to stand much noise or excitement. I had enough
37+
of both in Afghanistan to last me for the remain-
38+
der of my natural existence. How could I meet this
39+
friend of yours?”
40+
“He is sure to be at the laboratory,” returned
41+
my companion. “He either avoids the place for
42+
weeks, or else he works there from morning to
43+
night. If you like, we shall drive round together
44+
after luncheon.”
45+
“Certainly,” I answered, and the conversation
46+
drifted away into other channels.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
As we made our way to the hospital after leav-
2+
ing the Holborn, Stamford gave me a few more
3+
particulars about the gentleman whom I proposed
4+
to take as a fellow-lodger.
5+
“You mustn’t blame me if you don’t get on with
6+
him,” he said; “I know nothing more of him than
7+
I have learned from meeting him occasionally in
8+
the laboratory. You proposed this arrangement, so
9+
you must not hold me responsible.”
10+
“If we don’t get on it will be easy to part com-
11+
pany,” I answered. “It seems to me, Stamford,” I
12+
added, looking hard at my companion, “that you
13+
have some reason for washing your hands of the
14+
matter. Is this fellow’s temper so formidable, or
15+
what is it? Don’t be mealy-mouthed about it.”
16+
“It is not easy to express the inexpressible,”
17+
he answered with a laugh. “Holmes is a little
18+
too scientific for my tastes—it approaches to cold-
19+
bloodedness. I could imagine his giving a friend a
20+
little pinch of the latest vegetable alkaloid, not out
21+
of malevolence, you understand, but simply out
22+
of a spirit of inquiry in order to have an accurate
23+
idea of the effects. To do him justice, I think that
24+
he would take it himself with the same readiness.
25+
He appears to have a passion for definite and exact
26+
knowledge.”
27+
“Very right too.”
28+
“Yes, but it may be pushed to excess. When
29+
it comes to beating the subjects in the dissecting-
30+
rooms with a stick, it is certainly taking rather a
31+
bizarre shape.”
32+
“Beating the subjects!”
33+
“Yes, to verify how far bruises may be pro-
34+
duced after death. I saw him at it with my own
35+
eyes.”
36+
“And yet you say he is not a medical student?”
37+
“No. Heaven knows what the objects of his
38+
studies are. But here we are, and you must
39+
form your own impressions about him.” As he
40+
spoke, we turned down a narrow lane and passed
41+
through a small side-door, which opened into a
42+
wing of the great hospital. It was familiar ground
43+
to me, and I needed no guiding as we ascended the
44+
bleak stone staircase and made our way down the
45+
long corridor with its vista of whitewashed wall
46+
and dun-coloured doors. Near the further end a
47+
low arched passage branched away from it and led
48+
to the chemical laboratory.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
“No. Heaven knows what the objects of his
2+
studies are. But here we are, and you must
3+
form your own impressions about him.” As he
4+
spoke, we turned down a narrow lane and passed
5+
through a small side-door, which opened into a
6+
wing of the great hospital. It was familiar ground
7+
to me, and I needed no guiding as we ascended the
8+
bleak stone staircase and made our way down the
9+
long corridor with its vista of whitewashed wall
10+
and dun-coloured doors. Near the further end a
11+
low arched passage branched away from it and led
12+
to the chemical laboratory.
13+
This was a lofty chamber, lined and littered
14+
with countless bottles. Broad, low tables were scat-
15+
tered about, which bristled with retorts, test-tubes,
16+
and little Bunsen lamps, with their blue flickering
17+
flames. There was only one student in the room,
18+
who was bending over a distant table absorbed in
19+
his work. At the sound of our steps he glanced
20+
round and sprang to his feet with a cry of pleasure.
21+
“I’ve found it! I’ve found it,” he shouted to my
22+
companion, running towards us with a test-tube in
23+
his hand. “I have found a re-agent which is precip-
24+
itated by hœmoglobin, and by nothing else.” Had
25+
he discovered a gold mine, greater delight could
26+
not have shone upon his features.
27+
“Dr. Watson, Mr. Sherlock Holmes,” said Stam-
28+
ford, introducing us.
29+
“How are you?” he said cordially, gripping
30+
my hand with a strength for which I should
31+
hardly have given him credit. “You have been in
32+
Afghanistan, I perceive.”
33+
“How on earth did you know that?” I asked in
34+
astonishment.
35+
“Never mind,” said he, chuckling to himself.
36+
“The question now is about hœmoglobin. No
37+
doubt you see the significance of this discovery of
38+
mine?”
39+
“It is interesting, chemically, no doubt,” I an-
40+
swered, “but practically—”

0 commit comments

Comments
 (0)