Lecture 1 Objectives
At the end of today's class you should
KNOW:
- That a struct in Racket is represented as a class in Java
- In Java, everything (data definitions and function definitions)
is part of a class
- Examples of data and test methods go in their own class
- That no matter how data is represented across different programming languages, the information itself is the same, and thus the structure of the data representation is the same
BE ABLE TO:
- Define a Java class with methods to represent data such as that captured
by Racket struct's
Sample Exam Question:
Define a class to represent the recording of a TV show using Tivo. The information that needs to be recorded about each show is the show's name, the channel number, the time the show starts, and the duration of the show. Provide
examples of data. Develop a method
isLongShow()
that produces true if this show is longer than one hour. Provide test cases for your method.