Input file commands

2 views
Skip to first unread message

Joe

unread,
Dec 4, 2010, 3:12:50 PM12/4/10
to COSC2320
Few questions

1. Can we assume that INSERT, DELETE or PRINT etc are always going to
be spelled correctly?
If not, what should we output? Also, should we output on screen or in
the text file?

2. Also, can we assume that a number is going to be followed after the
INSERT, CHECKOUT, RETURN and DELETE command?
Example: DELETE 57 (would an int always follow those commands)

3.Another question, for INSERT, is it always going to be followed by
an integer and then a book title? Or is there a possibility that there
won't be an integer? Or another possibility would be that the book
title will come before the integer.
For example would we be tested over the following:

INSERT "Twenty Thousand Leagues Under the Sea"

OR

INSERT "Twenty Thousand Leagues Under the Sea" 57


Sorry, I know those are a lot of questions but I am trying to think of
every test case possible that might crash my program.

ahmad qawasmeh

unread,
Dec 4, 2010, 3:34:23 PM12/4/10
to cosc...@googlegroups.com
Hi,
 
For all questions, Just follow the HW description.
 
Regards,
Ahmad

Joe

unread,
Dec 4, 2010, 3:39:56 PM12/4/10
to COSC2320
The HW is not very clear to me and it does not say what to do with
these cases that's why I asked for some clarifications. I know I had a
lot of questions to ask but I want to cover all possible test cases
for the assignment.
According to the HW description, I can assume that the commands should
be spelled correctly.

ahmad qawasmeh

unread,
Dec 4, 2010, 3:42:57 PM12/4/10
to cosc...@googlegroups.com
Hi,
 
Yes. The commands should be spelled correctly.
 
Regards,
Ahmad

Mario Blanco

unread,
Dec 4, 2010, 4:06:57 PM12/4/10
to cosc...@googlegroups.com
So just to make sure, we don't have to worry about test cases where the input file has commands that aren't spelled correctly or that lack an ID number or book name? All the input files will have commands spelled correctly and with everything required to perform the command?  

Thanks a lot. 

Sent from my iPhone

ahmad qawasmeh

unread,
Dec 4, 2010, 4:12:57 PM12/4/10
to cosc...@googlegroups.com
Hi,
 
I am copying this from the HW description:
 

Insertions should always work (assuming correct input syntax). Notice some CHECKOUT, RETURN

and DELETE commands may refer to invalid books.
 
In this case, just report an error in the output file.
 
Regards,
Ahmad

Joe

unread,
Dec 4, 2010, 5:44:13 PM12/4/10
to COSC2320
Thank you. That makes it a little bit more clear.
But what if there was a space(or more) after the command PRINT.
For example,
"PRINT"
vs.
"PRINT "

Should that still print or should we cout an error message?

On Dec 4, 3:12 pm, ahmad qawasmeh <arqawas...@gmail.com> wrote:
> Hi,
>
> I am copying this from the HW description:
>
> Insertions should always work (assuming correct input syntax). Notice some
> CHECKOUT, RETURN
> and DELETE commands may refer to invalid books.
>
> In this case, just report an error in the output file.
>
> Regards,
> Ahmad
>
>
>
>
>
>
>
> On Sat, Dec 4, 2010 at 4:06 PM, Mario Blanco <mblanco0...@gmail.com> wrote:
> >  So just to make sure, we don't have to worry about test cases where the
> > input file has commands that aren't spelled correctly or that lack an ID
> > number or book name? All the input files will have commands spelled
> > correctly and with everything required to perform the command?
>
> > Thanks a lot.
>
> > Sent from my iPhone
>
> > On Dec 4, 2010, at 2:42 PM, ahmad qawasmeh <arqawas...@gmail.com> wrote:
>
> >   Hi,
>
> > Yes. The commands should be spelled correctly.
>
> > Regards,
> > Ahmad
>

Joe

unread,
Dec 5, 2010, 4:26:54 PM12/5/10
to COSC2320
Also, can we assume that the input commands will always be in upper
case letters?

Thanks.

ahmad qawasmeh

unread,
Dec 5, 2010, 6:10:21 PM12/5/10
to cosc...@googlegroups.com
Hi,
 
Yes.
 
Regards,
Ahmad

Joe

unread,
Dec 5, 2010, 8:52:13 PM12/5/10
to COSC2320
Thank you

On Dec 5, 5:10 pm, ahmad qawasmeh <arqawas...@gmail.com> wrote:
> Hi,
>
Reply all
Reply to author
Forward
0 new messages