skip to main content
article
Free Access

An automatic testing and grading method for a C++ list class

Published:01 June 1999Publication History
Skip Abstract Section

Abstract

This paper presents a scheme for automatic grading of the member functions of a C++ list class. Developing an automatic grading program for C++ classes is non-trivial because a test case to verify one member function of the class may depend upon the correctness of one or more other class member functions. In addition, performing multiple test cases in the same driver program may produce invalid grading outcomes because an erroneous result from one test case could violate the preconditions for a later test case. The method described here uses a weakness of C++ data encapsulation that allows access to private data members of an object. Two instances of a list object are constructed, tested, and compared using student designed and instructor designed classes. If a test case produces incorrect results using the student's class, the instructor written class may be used (via a type cast) to access the private data members of the student's list object to correct the errors. The grading program automatically reports and tallies errors for each member function and for the class total.

References

  1. Hitchner, Lewis E., http://www.csc.calpoly.edu/~hitchner/CSC218.W98Google ScholarGoogle Scholar
  2. Hitchner, Lewis E., http://www.csc.calpoly.edu/~hitchner/CSC218.W98/progAssign2.htmlGoogle ScholarGoogle Scholar
  3. Hitchner, Lewis E., http://www.csc.calpoly.edu/~hitchner/CSC218.W98/TestPlan.doc.htmlGoogle ScholarGoogle Scholar
  4. Macpherson, P. A., "A Technique for Student Program Submission on UNIX Systems", SIGCSE Bulletin 29, 4 (December 1997). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Dale, Nell, Chip Weems, and Mark Headington, "Programming and Problem Solving with C++", D. C. Heath, 1996, problem #8, p. 830. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

(auto-classified)
  1. An automatic testing and grading method for a C++ list class

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGCSE Bulletin
      ACM SIGCSE Bulletin  Volume 31, Issue 2
      June 1999
      93 pages
      ISSN:0097-8418
      DOI:10.1145/571535
      Issue’s Table of Contents

      Copyright © 1999 Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 June 1999

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!