14

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS133 Course Notes The CoopStudent class public void setWorkTerm(boolean status) { } public String location() { if (isOnWorkTerm) { return this.getName() + " is on a work term."; } else { return this.getName()+ " is on campus."; } } } Lecture 14, Slide 21 CS133 Course Notes Lecture 14, Slide 22 this.isOnWorkTerm = status; from Student class 21 22 Example: CoopStudent > CoopStudent chantelle = new CoopStudent("Chantelle", 5555555); > System.out.println(chantelle.getName()); ___________________ > chantelle.onWorkTerm(true); > System.out.println(chantelle.calcFees()); ___________________ > chantelle.addCourse("ECE 476"); > chantelle.onWorkTerm(false); > System.out.println(chantelle.calcFees()); ___________________ > System.out.println(chantelle.location()); Terminology ...
View Full Document

This note was uploaded on 07/17/2010 for the course CS 133 taught by Professor Kierstead during the Fall '07 term at Waterloo.

Ask a homework question - tutors are online