Computer Science 252
Problem Solving with Java
Spring 2016, The College of Saint Rose
Lecture 7: Defining Custom Classes
Date: Tuesday, February 9, 2016
Agenda
- Announcements
- Lab status:
- More custom classes
Lecture 7 Assignment
Due at the start of class, Thursday, February 11.
Please submit answers to these questions
either as a hard copy (typeset or handwritten are OK) or by email to
terescoj AT strose.edu by the start of class. Please use a clear subject line
when submitting by email (e.g., CSC 252 Lecture
7 Assignment , Joe Student). We will discuss these
questions at the start of class, so no late submissions are
accepted.
- Suppose we would like to develop a class called RoundFrame
that uses two FilledOvals, one larger with a given color, and
one smaller that is always white. One of these objects would look
like this:
- give instance variables that could be used for this class (2 points)
- write the move method forthis class (2 points)
- Write hide and show methods for the NiceBBall
class in the FancyBasketball example. (6 points)
Examples