180 likes | 331 Views
Exploiting Automatic Testing in BlueJ Programming Process and Practical Lab Exam. Michael E. Caspersen University of Aarhus Denmark mec@daimi.au.dk. User Talk First BlueJ Day, 1 March 2006. Uses of BlueJ. General IDE edit, compile, run, ... Exploring “the notional machine”
E N D
Exploiting Automatic Testingin BlueJProgramming Process and Practical Lab Exam Michael E. Caspersen University of Aarhus Denmark mec@daimi.au.dk User Talk First BlueJ Day, 1 March 2006
Uses of BlueJ • General IDE • edit, compile, run, ... • Exploring “the notional machine” • debugger (flow of control, object model, object interaction, ...) • Incremental program development • automatic testing • Model-driven programming • UML support First BlueJ Day, 1 March 2006
Outline • Programming Process • Choice of Examination Form • Practical Lab-Exam • ”Conclusion” First BlueJ Day, 1 March 2006
The Missing Link... tools concepts language constructs finished programs ? First BlueJ Day, 1 March 2006
tools concepts language constructs finished programs Strategies, Principles, and Techniques ... for the systematic development of programs • The Practice of Programming • Describe strategies, principles, and techniques of program development • Demonstrate how to apply these in action • Develop programs instead of simply showcasing them • Demonstrate that programming is a non-linear process • Demonstrate incremental development • Demonstrate model-driven development • Demonstrate test-driven development • Demonstrate responsibility-driven development • Demonstrate refactoring • Demonstrate how to find and handle errors • Demonstrate how to use online documentation • Demonstrate, demonstrate, demonstrate ... First BlueJ Day, 1 March 2006
public class Date { private int d, // 1 <= d <= daysInMonth m, // 1 <= m <= 12 y; public Date(int dd, int mm, int yy) { d = dd; m = mm; y = yy; } public void setToNextDate() { d = d + 1; } public String toString() { return d + "-" + m + "-" + y; } } Example: Class Date • Refinement of class Date • Special cases • systematic treatment of special cases • suppress implementation details • introduce private methods to handle special cases • The mañana principle • introduce an abstraction • worry about implementation details ”tomorrow” First BlueJ Day, 1 March 2006
Refinement and Automatic Testing R1: Naive implementation of class Date R2: Add checkDayOverflow R3: Add checkMonthOverflow R4: 28, 30, or 31 days in month R5: Partial leap year rule R6: Complete leap year rule First BlueJ Day, 1 March 2006
Education as a Goal-Oriented Activity • Articulate aims and goals • Short as well as long term • Micro as well as macro level (assignment, lecture, course, degree) • Design assessment method • such that a winning strategy with respect to assessment optimize learning • Design teaching and (intended) learning process • Progression, abstract vs. concrete, general vs. special, apprenticeship approach, spiral approach, early bird, ... • Decide on dissemination methods • Material (textbook, web, learning objects, videos, sample programs, ...) • Teaching method (lecture, class, lab, student collaboration, project work, supervision, ...) First BlueJ Day, 1 March 2006
Course and Exam Must Match • The final exam must reflect the contents of the course • The spirit and style of student assessment defines de facto the curriculum.— Rowntree, 1977 • The type of grading influences the student’s learning approach. — Ramsden, 1992 • We find it mandatory to apply an evaluation form where the students demonstrate their practical programming skills as well as their understanding of the fundamental concepts and theories from the curriculum of the course. • In short: course contents and final exam must match. First BlueJ Day, 1 March 2006
Oral Exam Written Exam Multiple Choice Practical Exam Choice of Examination Form • Test the students against expected competencies • After the course the student will be able to use fundamental elements in a modern programming language • Use conceptual modelling for systematic development of simple object-oriented programs • Implement simple oo-models in a modern programming language, and • Use selected class libraries • Weekly mandatory assignments prepare the students for the exam but they don’t count in the final grading First BlueJ Day, 1 March 2006
Practical Lab Exam • Staff • Teacher, external examiner, 4-5 TAs • Students • 20 per group; 12 groups (200+ students) • Time • 30 minutes for the assignment, 60 minutes in total • Assignment • A new for each group (though similar) • ~10 programming tasks; breakpoint after #2 • Pass point: task #6 • Evaluation • Process as well as product (i.e. the students behaviour also counts in the final grading • If the lecturer and external examiner estimate so, an appropriate and systematic programming process can compensate for minor flaws and errors in the product and make a student pass First BlueJ Day, 1 March 2006
Employee String name int salary int getSalary() String toString() 1 * hOD employees Department String departmentName void add(Employee e) void remove(Employee e) Employee getHOD() int getDepartmentSalary() Employee bestPaidEmployee () Sample Exam Assignment • Create a simple class Employee with constructor, getSalary, and toString method… • Create a class EmployeeTest... • Create a new class Department ... • Implement the methods addTrack, removeTrack, and getHOD • Create a class DepartmentTest… • Implement getDepartmentSalary • Add a method to DepartmentTest to test the getDepartmentSalary method • Implement bestPaidEmployee • Add a method to DepartmentTest to test the bestPaidEmployee method • Let the Employee class implement the Comparable interface… First BlueJ Day, 1 March 2006
Use of BlueJ • Develop • Test • Submit First BlueJ Day, 1 March 2006
“Conclusion” • General IDE • edit, compile, run, ... • Exploring “the notional machine” • debugger • Incremental program development • automatic testing • Model-driven programming • UML support BlueJ Simplifies Matters First BlueJ Day, 1 March 2006
References Jens Bennedsen & Michael E. Caspersen,”Programming in Context – A Model-First Approach to CS1”, Proceedings of the thirty-fifth SIGCSE Technical Symposium on Computer Science Education, Norfolk, Virginia, USA, 2004, pp. 477-481. Jens Bennedsen & Michael E. Caspersen,”Teaching Object-Oriented Programming – Towards Teaching a Systematic Programming Process”, Proceedings of the Eighth Workshop on Pedagogies and Tools for the Teaching and Learning of Object-Oriented Concepts, 18th European Conference on Object-Oriented Programming, ECOOP 2004, Oslo, Norway, 2004. Jens Bennedsen & Michael E. Caspersen,”Revealing the Programming Process”, Proceedings of the thirty-sixth SIGCSE Technical Symposium on Computer Science Education, St. Louis, Missouri, USA, 2005, pp. 186-190. Jens Bennedsen & Michael E. Caspersen,”Assessing Process and Product – A Practical Lab Exam for an Introductory Programming Course”, Submitted for Frontiers in Education, FIE 2006, San Diego, USA, October 2006. Michael E. Caspersen, Teaching Object-Oriented Programming – Strategies, Principles, and Techniques, Progress Report, Department of Computer Science, University of Aarhus, 18 April 2005. (42 pages) www.daimi.au.dk/~mec/papers/ mec@daimi.au.dk First BlueJ Day, 1 March 2006