Discussion:
Some test cases for A3Q3
(too old to reply)
xewang
2011-06-13 21:38:47 UTC
Permalink
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!

Words not found in dictionary:

AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA

is this right?
xewang
2011-06-13 21:57:30 UTC
Permalink
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?

we have
A?A
?AAA
AAA

right?

what about ???

its just ??
Ashif Harji
2011-06-14 02:05:02 UTC
Permalink
You should be able to test these cases and any others using the reference
executable. FYI, I believe there is an error in your output below.

ashif
Post by xewang
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?
we have
A?A
?AAA
AAA
right?
what about ???
its just ??
Alex Walter
2011-06-14 02:45:47 UTC
Permalink
Post by Ashif Harji
You should be able to test these cases and any others using the
reference executable. FYI, I believe there is an error in your output
below.
ashif
Post by xewang
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?
we have
A?A
?AAA
AAA
right?
what about ???
its just ??
He did have a good point with ???

What is the program supposed to return when it is given just
punctuation. My program fully works except for this situation.

The given solution produces a single ?
But my solution produces a blank line

I think my solution makes more sense since all punctuation at the end or
beginning of a word should be removed and there is no word.

Or do we not have to consider about this case?
Alex Walter
2011-06-14 02:51:00 UTC
Permalink
Post by Alex Walter
Post by Ashif Harji
You should be able to test these cases and any others using the
reference executable. FYI, I believe there is an error in your output
below.
ashif
Post by xewang
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?
we have
A?A
?AAA
AAA
right?
what about ???
its just ??
He did have a good point with ???
What is the program supposed to return when it is given just
punctuation. My program fully works except for this situation.
The given solution produces a single ?
But my solution produces a blank line
I think my solution makes more sense since all punctuation at the end or
beginning of a word should be removed and there is no word.
Or do we not have to consider about this case?
Wait I meant to say just all punctuation at the end of a word should be
removed, but why is the first question mark being considered as part of
the word but the other ones aren't.
xewang
2011-06-14 03:20:15 UTC
Permalink
Post by Alex Walter
Post by Alex Walter
Post by Ashif Harji
You should be able to test these cases and any others using the
reference executable. FYI, I believe there is an error in your output
below.
ashif
Post by xewang
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?
we have
A?A
?AAA
AAA
right?
what about ???
its just ??
He did have a good point with ???
What is the program supposed to return when it is given just
punctuation. My program fully works except for this situation.
The given solution produces a single ?
But my solution produces a blank line
I think my solution makes more sense since all punctuation at the end or
beginning of a word should be removed and there is no word.
Or do we not have to consider about this case?
Wait I meant to say just all punctuation at the end of a word should be
removed, but why is the first question mark being considered as part of
the word but the other ones aren't.
How do you guys get regress to work?
I still can't figure it out.

I copied the code into a txt and saved it as an excutable called regress.

when I try to run it in the terminal like
./regress spellcheck_64 ' ' spellcheck ' ' dictonary test1.txt
it says program1 is not executable :(

Can someone help me please?
Alex Walter
2011-06-14 03:57:27 UTC
Permalink
Post by xewang
Post by Alex Walter
Post by Alex Walter
Post by Ashif Harji
You should be able to test these cases and any others using the
reference executable. FYI, I believe there is an error in your output
below.
ashif
Post by xewang
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?
we have
A?A
?AAA
AAA
right?
what about ???
its just ??
He did have a good point with ???
What is the program supposed to return when it is given just
punctuation. My program fully works except for this situation.
The given solution produces a single ?
But my solution produces a blank line
I think my solution makes more sense since all punctuation at the end or
beginning of a word should be removed and there is no word.
Or do we not have to consider about this case?
Wait I meant to say just all punctuation at the end of a word should be
removed, but why is the first question mark being considered as part of
the word but the other ones aren't.
How do you guys get regress to work?
I still can't figure it out.
I copied the code into a txt and saved it as an excutable called regress.
when I try to run it in the terminal like
./regress spellcheck_64 ' ' spellcheck ' ' dictonary test1.txt
it says program1 is not executable :(
Can someone help me please?
./regress ./spellcheck_64 "dictionary test1.txt" ./spellcheck
"dictionary test1.txt" regress
Ashif Harji
2011-06-14 04:16:32 UTC
Permalink
Post by Alex Walter
Post by Ashif Harji
You should be able to test these cases and any others using the
reference executable. FYI, I believe there is an error in your output
below.
ashif
Post by xewang
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also if we have A?A ?AAA AAA?
we have
A?A
?AAA
AAA
right?
what about ???
its just ??
He did have a good point with ???
What is the program supposed to return when it is given just punctuation. My
program fully works except for this situation.
The given solution produces a single ?
But my solution produces a blank line
I think my solution makes more sense since all punctuation at the end or
beginning of a word should be removed and there is no word.
Or do we not have to consider about this case?
My apologies. Both you and the original sender are correct. There is
a problem with the reference executable. For words consisting entirely of
punctuation, there should be no output. I have corrected and reposted the
reference executables. Thank you very much for pointing out the problem.

ashif
xewang
2011-06-13 22:29:47 UTC
Permalink
Post by xewang
'AAA' 'AAA AAA'A AAA' "AAA" !AAA AAA!
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also

Does anyone know how to simulate peekchar() like in C?
Muhammad tauqir
2011-06-15 20:18:05 UTC
Permalink
I think peekchar() is a given method of the ifstream object in C++.
So if you have:
ifstream in;

and then you open in with some file, in.peekchar() will return a 'peek'
of the next char.
Post by xewang
Post by xewang
AAA
AAA
AAA'A
AAA'
AAA
!AAA
AAA
is this right?
Also
Does anyone know how to simulate peekchar() like in C?
Regards,
Muhammad Tauqir

Loading...