Course Level
CS1
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type
Lab
Synopsis

In this lab students write ten methods for a Date class that stores information about the day, month, and year. Students must write methods to check whether two Dates are the same, find the next and previous Dates, find the Date some number of days in the future or past, find whether a Date is before or after another Date, find the number of days between two Dates, and find the day of the week of a Date. This lab requires students to work with classes, comparative methods, and loops. It is particularly useful for students who are new to designing classes.

Recommendations

Integrate pair programming when it is appropriate for students to collaborate on a lab, assignment, or project. The “driver” controls the mouse and the keyboard, while the “navigator” makes suggestions, points out errors, and asks questions. Partners routinely switch roles to gain the benefits of each role.

Engagement Highlights

Relates the CS topics to concepts from students' own experience to Employ Meaningful and Relevant Content.

Engagement Practices Employed

Materials and Links

Computer Science Details

Programming Language
Python

Material Format and Licensing Information

Creative Commons License
CC BY-NC