Steve
Steve
asWhat I am trying to do is set up a constructor for a singly-linked list that makes the list empty.
So my advice was to get you through that hurdle. Substitute 'singly' for 'doubly' in my post above.What I am trying to do is set up a constructor for a doubly-linked list that makes the list empty.
Steve
"Il y a peu de choses qui me soient impossibles..."
Robert Maino wrote:Oh I see, so the pointer does not have a value in itself, while all the other elements have values as well as a pointer directing them to the next element.
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:
Robert Maino wrote:Oh I see, so the pointer does not have a value in itself, while all the other elements have values as well as a pointer directing them to the next element.
You got it, Robert!
Robert Maino wrote:Here is a full summary of what I have to do, it should explain in easier terms what I am trying to accomplish with the "dummy" head.
http://www.pcs.cnu.edu/~siochi/classes/cpsc270/ListSCBL/
"Il y a peu de choses qui me soient impossibles..."
Robert Maino wrote:Alright, so I tried something else, but I still have zero indication whether to tell me if I am on the right track or not.
Steve
Robert Maino wrote:Alright, so I tried something else, but I still have zero indication whether to tell me if I am on the right track or not.
"Il y a peu de choses qui me soient impossibles..."
Steve Luke wrote:Your prof. told you: every method should have a test written for it (it is in the requirements.) That is a great practice to get into. You can also try to write the tests before you write the method, so you think about what 'success' and what 'failure' means. Then run them after coding and make sure your 'success' tests succeed and your 'failure' tests fail. [emphasis added by Miller]
But that is still ahead. First: you should have a real solid feel of what you need to do written out, in simple terms and great detail before you code. You should be pretty confident you understand what you are doing first.
Otherwise you code yourself into corners. (believe me, I know, I've been in many a corner).
"Il y a peu de choses qui me soient impossibles..."
Robert Maino wrote:Well I took all of you all's advice
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:tell yourself that you are doing computer science, not computer programming...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Robert Maino wrote:I couldnt exactly find a way to test it
"Il y a peu de choses qui me soient impossibles..."
Winston Gutkowski wrote:
Stevens Miller wrote:tell yourself that you are doing computer science, not computer programming...
Like it; and I intend to plagiarise it too.![]()
"Il y a peu de choses qui me soient impossibles..."
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:Any suggestions?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Stevens Miller wrote:Any suggestions?
Yeah. Get the Oxford University version of Java.
"Il y a peu de choses qui me soient impossibles..."
Not at all. It won’t work. Not even close. I wrote “lits” instead of “list”.Stevens Miller wrote: . . . Campbell has written an almost complete test suite for you
That is because all the diagrams in this thread looked like stacks.(though he has, understandably, written it in the expectation that your singly linked list is best treated as a stack, . . .
Campbell Ritchie wrote:II was busy, changing bicycle chains, and going to a concert (Youth Chorale preforming Brahms’ German Requiem and Haydn’s Missa in Angustiis (“Nelson” Mass), so I couldn’t comment earlier.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:
Not at all. It won’t work. Not even close. I wrote “lits” instead of “list”.Stevens Miller wrote: . . . Campbell has written an almost complete test suite for you
That is because all the diagrams in this thread looked like stacks.(though he has, understandably, written it in the expectation that your singly linked list is best treated as a stack, . . .
I see you have been ranting.
I am not sure I can comment, because whatever I say, either you or Winston will tell me I have spelt it wrongly!
I seem to see so many posts on this forum where I get the impression people are being examined in their ability to write bad code.
WEB-CAT follows a certain sequence of steps to assess a project submission. A submission is assessed only if it compiles successfully. If compilation fails, then a summary of errors is displayed to the user. If the program is compiled successfully then WEB-CAT will assess the project on various parameters. It first tests the correctness of the program by running the student’s tests against the program. Since these tests are submitted by the students, and it is expected that 100% of the tests will pass, because we do not expect students to submit a program that fails their own tests. After this the student’s test cases are validated by running them against a reference implementation of the project created by the instructor. If a student's test case fails on the reference implementation then it is deemed to be invalid. Finally the coverage of the student’s test cases is evaluated. Once the scores are obtained a cumulative score out of 100 is calculated applying a certain formula on the scores from all criteria. The results are displayed immediately to the student on an HTML interface.
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:So true. Winston kindly
stoleadopted my distinction between "computer science" and "computer programming," in favor of science when one is learning to cope with structures. But, at some point, one must write code if one is going to program computers. My concern for a long time has been that, in the academy, programming is not taught by programmers, it is taught by scientists. This is rather like having mechanical engineering taught by physicists.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Steve
Steve Luke wrote:Nowhere is it mentioned that WebCat is the only grading standard. It is simply a tool to save the prof. from having to compile and run every submission.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Stevens Miller wrote:So true. Winston kindly
stoleadopted my distinction between "computer science" and "computer programming," in favor of science when one is learning to cope with structures.
1. Haven'tstolenadopted yet. It was merely a statement of intent.![]()
Steve Luke wrote:I think the complaints [about the grading method] are superficial and filled with assumptions. WebCat is just the tool the professor uses to test functional completeness (the code compiles, runs, and does what it is supposed to). Nowhere is it mentioned that WebCat is the only grading standard. It is simply a tool to save the prof. from having to compile and run every submission. So before another rant about how bad some prof. is doing their job, perhaps take a step back and consider what your assumptions are.
"Il y a peu de choses qui me soient impossibles..."