CSCI 202: Object-Oriented Programming
Programs designed in class
- Inheriting Circ.java and Rect.java classes from Shape.java class.
- Testing shapes: TestShapes.java
- Working with array of objects
- Computing the total area of shapes: ArrayShapes1.java
- Using the instanceof keyword: ArrayShapes2.java
- Passing objects to methods: ArrayShapes3.java
- A demo for polymorphism and dynamic binding: HelloHi.java
- Up- and down-casting demo: Casting.java
- Autoboxing: Autoboxing.java
- Methods with variable number of parameters: VarNumPar.java
- Working with class java.lang.Number: Numbers.java
- Pointers to methods: MethodPtr.java
- The equals method:
- in a superclass: Shape5.java
- in a subclass: Rect5.java